If you frequently send mail to a certain group of people (all the people in your department, for example) you can create an alias (a name given to a list of their logins), as a short way to refer to them as a group. You can use the alias when you need to address a message to them all. Treat an alias just like a user's login: put it in the ``To'', ``Cc'' or ``Blind Cc'' field of the message header form.
The alias command links a group of names with the single name given by the first argument. For example, you can create an alias called XTRproject by adding the following line to your .mailrc file:
alias XTRproject perry susant peterp kevincYou can then use the name XTRproject in a destination address (mail XTRproject), and mail expands it to the four names aliased to XTRproject.
Aliases that you define are expanded in mail sent to others so that they can reply to each individual recipient. For example, the ``To'' field in a message sent to XTRproject reads:
To: perry susant peterp kevincand not:
To: XTRprojectYou can find out what aliases you have set up by typing alias at the mail prompt.
You should add aliases to your .mailrc file. For details on setting variables in the .mailrc file, see ``Setting environment variables''.
Note that your system administrator may already have set up system-wide aliases for use by everyone. These aliases are not expanded when displayed in the ``To'' field since they are available to everyone. The file that contains the system-wide alias definitions is itself defined in the file /usr/mmdf/mmdftailor that contains lines such as:
; ; Alias configuration ; MATBL name=aliases, file="/usr/local/lib/mail/aliases.mmdf"These lines show that the table of aliases used by the mail system is built from the file /usr/local/lib/mail/aliases.mmdf. (Your system may use a different pathname for the alias definitions file.) You may find that the alias definitions file is quite complicated; it can assign both aliases and logins to an alias. In this way, it builds a hierarchy of aliases that can match the hierarchy within an organization or a project. For example, the alias definitions file might contain entries such as:
# teams Ateam: alice, henry, jackie Bteam: james, trish BIGteam: Ateam, BteamThese entries define aliases Ateam and Bteam for two groups of people. The alias BIGteam is composed of the members of these two aliases.
To discover who belongs to a personal or a system-wide alias, enter A alias_name at the mail prompt. mail expands the alias into a full list of mail addresses.