aliases File for Mail

Purpose

Contains alias definitions for the sendmail command.

Description

The /etc/mail/aliases file contains the required aliases for the sendmail command. Do not change these defaults, as they are required by the system. The file is formatted as a series of lines in the form:
name: name_1, name_2, name_3,...

The name: is the name of the alias, and the name_n are the aliases for that name. Lines beginning with white space are continuation lines. Lines beginning with a # (pound sign) are comments.

Aliasing occurs only on local names. System-wide aliases are used to redirect mail. For example, if you receive mail at three different systems, you can use the /etc/mail/aliases file to redirect your mail to one of the systems. As an individual user, you can also specify aliases in your .mailrc file.

Aliases can be defined to send mail to a distribution list. For example, you can send mail to all of the members of a project by sending mail to a single name.

The sender of a message is not included when the sendmail command expands an alias address. For example, if amy sends a message to alias D998 and she is defined as a member of that alias, the sendmail command does not send a copy of the message to amy.

The /etc/mail/aliases file is a raw data file. The sendmail command uses a database version of this file. You must build a new alias database by running the sendmail -bi command or the newaliases command before any changes made to the /etc/mail/aliases file become effective.

Berkeley DB support is now available on AIX® 5.1 for Sendmail 8.11.0. As long as you do not rebuild the aliases database, sendmail will continue to read it in its old DBM format. This consists of two files: /etc/mail/aliases.dir and /etc/mail/aliases.pag. However, the moment you rebuild the aliases database, sendmail will change this format to Berkeley DB. This file will be stored in /etc/mail/aliases.db.

Note: Upper case characters on the left hand side of the alias are converted to lowercase before being stored in the aliases database. In the following example, mail sent to the testalias user alias fails, since TEST is converted to test when the second line is stored.
TEST: user@machine
testalias: TEST

To preserve uppercase in user names and alias names, add the u flag to the local mailer description in the /etc/mail/sendmail.cf file. Thus, in the example above, mail to the testalias user alias would succeed.

Files

Item Description
/etc/mail/aliases Contains systemwide aliases.
/etc/mail/aliasesDB directory Contains the binary files created by the newaliases command, including the DB.dir and DB.pag files.
/etc/mail/aliases.db Contains the binary file storing the aliases database in Berkeley DB format, created by the newaliases command