How can we help?

Watch this space: Upcoming Help Centre Migration


Batch Creation of Aliases in Atmail

Stewart -


I need to create alot of email aliases.


  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version


If you have many aliases you wish to define for Atmail then it can become tedious using the Webadmin UI. With this in mind we have created an easy to use CLI script to overcome the problem of bulk/batch adding of aliases into Atmail.


  1. Download the script from here. Then extract into place with the following command.
    tar xvzf batch-alias-create.tgz -C /usr/local/atmail/webmail
    You will then find the script located at/usr/local/atmail/webmail/utilities/tools/batch-alias-create.php
  2. The script usage is as such:
    php batch-alias-create.php /path/to/csv
  3. The csv file should take the following format:
  4. Where alias-type can be either:
    • Local - divert email from the address given in alias-name to the address/es given in forward-to
    • Deliver - deliver to the address given in alias-name and also forward to the address/es in forward-to
    • Domain - Catch all email going to the domain specified in alias-name and forward it to the address/es inforward-to
    • Virtual -  Forward all email from the domain in alias-name to the domain in forward-to
    • MailDir - store any email's coming to the address in alias-name at the path defined by forward-to
  5. Where alias-name is either an email address or a domain name, depending on alias-type
  6. Where forward-to is either an email address, a list of email addresses (separated by a semi-colon ; ) or a domain name, depending on alias-type.
  7. Here is an example csv file:
    • So the first line creates a MailDir Alias (as it is called in Webadmin) which stores any mail sent to at /usr/home/brad/mail.
    • The second line creates a "Deliver Locally and Alias" alias, which forwards a copy of any mail for to, and (it also delivers a copy to Notice that the forward-to addresses are separated by a semi-colon ( ; ) and not a comma ( , )
    • The third line creates a "Local Alias", so  that any email received for is forwarded to (you can specify multiple forward-to recipients, separated by a semi-colon ; )
    • The fourth line creates a "Virtual Domain Alias" where any mail received for any user is forwarded to that same user (so for eg. mail for will be forwarded to
    • The fifth line creates a "Domain" or "Catch All" alias, where any email sent to any user at is forwarded to

This script is also very useful for creating mailing lists as described in this article.


Contact our support team

+61 (7) 5357 6605