Create a new mail alias
This command can be used to add a new email alias to a virtual server. It takes three mandatory parameters :
--domain followed by the domain name,
--from followed by the name of the alias within that domain, and
--to followed by a destination address. For example, to create an alias for email@example.com that delivers mail to the user joe, you could run :
virtualmin create-alias --domain foo.com --from sales --to firstname.lastname@example.org
--to option can be given multiple times, to create more than one destination for the alias. To create an alias for all addresses in the domain that are not matched by another alias or mail user, use the option
--from "*" .
Aliases can have short descriptions associated with them, to explain what the alias is for. To set one when creating, you can use the --desc option followed by a one-line description.
To more easily create aliases with autoresponders, you should use the
create-simple-alias command, which is analagous to the simple alias creation form in Virtualmin's web UI.
Command Line Help
virtualmin create-alias --domain domain.name --from mailbox|"*" + [--desc "Comment text"]