Virtual domain email aliases HOWTO for sme server
Release applicable: sme server v6.0, 6.0.1
Author: Ray Mitchell mitchellcpa_AT_yahoo.com.au
Original author: Darrell May
Contributor: Gordon Rowell
Revision date: June 3, 2004 v1
You need to set-up virtual e-mail domains that support for example email@example.com and forward this e-mail to the appropriate recipient. For our example will send firstname.lastname@example.org to the user fred.
Step 1- Virtual Domain Set-up:
Use the e-smith-manager, Configuration/Domains panel to set-up the virtual domain, domain1.com. Instructions are found in the user manual.
Step 2 - Create your user:
Use the e-smith-manager, User accounts panel to set-up the user fred. Instructions are found in the user manual.
Step 3 - Create a templates-custom fragment: mkdir -p /etc/e-smith/templates-custom/var/qmail/control/virtualdomains pico /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/90aliases
In this 90aliases file enter all your virtual aliases in the form alias:username. In the example below email@example.com is to go to user fred.
If you want all domain mail going into one account, enter your virtual alias in the form domain:username. In the example below domain1.com:fred sends all @domain1.com mail to user fred.
If you want all domain mail going into one account, except for defined users, enter your virtual aliases in the form shown below. In the example below domain1.com:fred sends all @domain1.com mail to user fred except for jim and bob who get their mail directly..
domain1.com:fred firstname.lastname@example.org:jim email@example.com:bob
Step 4 - Save the file above and execute a email-update:
This recreates the file var/qmail/control/virtualdomains with the above alias entries preceeding the domain entries and restarts qmail.
Step 5 - Test the above virtual aliases:
Send an e-mail to firstname.lastname@example.org to test that it is received by the qmail server without error and reach the intended recipient (fred) mailbox.
Should readers of this HOWTO wish to configure email aliases on earlier versions of sme server, they need to do the following steps as well (in the correct sequence) or alternatively refer to earlier versions of this HOWTO by Darrell May
Step 2a - Create users .qmail-default: (not required in v6.0 sme server)
In the users home directory, /home/e-smith/files/users/fred create a file named .qmail-default containing only one line, the users name, fred.
pico /home/e-smith/files/users/fred/.qmail-default - add the one word fred - save the file
Step 2b - Set the ownership and rights on .qmail-default to the user only: (not required in v6.0 sme server)
chown fred:fred /home/e-smith/files/users/fred/.qmail-default
chmod 644 /home/e-smith/files/users/fred/.qmail-default