create-alias

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 as --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 protected] that delivers mail to the user joe, you could run: virtualmin create-alias --domain example.com --from sales --to [email protected] The --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 "*".

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 as --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 protected] that delivers mail to the user joe, you could run:

virtualmin create-alias --domain example.com --from sales --to [email protected]

The --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 auto-responders, you should use the create-simple-alias command, which is analogous to the simple alias creation form in Virtualmin user interface.

Command line help#

virtualmin create-alias --domain domain.name
 --from mailbox|"*"
 <--to address>+
 [--desc "Comment text"]

Source: https://www.virtualmin.com/docs/development/api-programs/create-alias/

  • virtualmin, domain, alias, email, mail, mailbox, user, log, command line, script, create
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Pre and Post Domain Modification Scripts

Virtualmin allows the use of custom scripts (Shell, Perl, Python and etc.) to automate tasks...

OS Support

Virtualmin runs on top of Webmin. Webmin works on almost every UNIX-like OS, so with some manual...

Professional Features

Virtualmin GPL is already an extremely powerful and flexible virtual hosting control panel, so...

How to Configure Secondary DNS

This guide provides administrators with a quick overview of setting up automatic DNS secondary...

How to Configure Cloudflare DNS

For users looking to integrate Cloudflare with Virtualmin Pro, the process is straightforward and...