Mac OS X 10.6 Server Admin: Creating Additional Mail Addresses for Users
Mail service allows each user to have more than one mail address. These additional addresses are called aliases. Every user has one mail address that’s formed from the short name of the user account.
In addition, you can define more names for any user account by creating an alias file. Each additional name is an alternate mail address for the user at the same domain. These additional mail addresses aren’t additional accounts and don’t require separate quotas or passwords.
Most often, alias files are used to map postmaster users to a real account and give a “firstname.lastname@example.org” mail address to a user with a short login account name.
There are two types of mail aliases: Mac OS X Server-style, and Postfix-style. Each has its advantages and disadvantages.
Mac OS X Server–style aliases are easy to make and are listed with a user’s login name. You can easily see the alias that refers to each user. The disadvantage of this is that Mail service’s Sieve functionality doesn’t understand Mac OS X Server-style aliases and can’t filter mail based on the Mac OS X Server-style alias.
Postfix-style aliases require command-line administration and are less obvious to audit. However, the major benefit to using Postfix-style aliases is their compatibility with Sieve scripting. Only aliases generated Postfix-style can be acted upon by Sieve scripts.
If you are using this feature with virtual mail hosting and are using Mac OS X v10.4.3 or later, you must enter a fully-qualified mail address (i.e.username@domain_name) in the location indicated in Workgroup Manager.
In Workgroup Manager, open the user account you want to work with, if it isn’t open.
To open the account, click the Accounts button, click the globe icon below the toolbar menu and open the directory domain where the account resides. Click the lock to be authenticated. Select the user in the user list.
Click the Basic tab.
Double-click under the last entry in the Short Names field.
Enter the alias.
For example, if your domain is example.com and you want to give user name bob an alias of robert.fakeuser you should enter:robert.fakeuser
If virtual hosting is enabled, enter the fully qualified mail address:email@example.com
Create the file /etc/postfix/aliases, if none exists.
For each alias, make a line in the file with the following format:
For example, for your domain example.com, if you want to give user name bob”an alias of robert.fakeuser you enter:robert.fakeuser: bob
This takes mail sent to your mail server for firstname.lastname@example.org and sends it to the real mail account, email@example.com.
Save your file changes.
In the Terminal application, enter the following command:postalias /etc/postfix/aliases
The text file is processed into a database for faster access.
At the prompt, enter the following command:newaliases
The alias database will reload.
As a result, mail to firstname.lastname@example.org is sent to user bob, giving Bob two effective mail addresses, email@example.com and firstname.lastname@example.org.
For further information about creating and maintaining mail aliases, see /etc/postfix/aliases.