Aliases map names to address lists using personal, system-wide, and domain-wide alias files. You can define three types of aliases:
personal | Defined by individual users in the user's $HOME/.mailrc file. |
local system | Defined by the mail system administrator in the /etc/mail/aliases file. These aliases apply to mail handled by the sendmail program on the local system. Local system aliases rarely need to be changed. |
domainwide | By default, sendmail reads /etc/alias to resolve aliases. To override the default and use NIS,
edit or create /etc/netsvc.conf and add the line:
aliases=nis |
Note: In versions earlier than AIX 5.1, the aliases file is located in /etc/aliases.
The /etc/mail/aliases file consists of a series of entries in the following format:
Alias: Name1, Name2, ... NameX
where Alias can be any alphanumeric string that you choose (not including special characters, such as @ or !). Name1 through NameX is a series of one or more recipient names. The list of names can span one or more lines. Each continued line begins with a space or a tab. Blank lines and lines beginning with a # (pound sign) are comment lines.
The /etc/mail/aliases file must contain the following three aliases:
Whenever you change this file, you must recompile it into a database format that the sendmail command can use. See Building the Alias Database.
To create or modify local system aliases:
writers: geo, mark@zeus, ctw@athena, brian
This definition could also be contained on several lines, as long as each added line begins with a space or a tab, for example:
writers: geo, mark@zeus, ctw@athena, brian
editors: glenda@hera, davidm@kronos, perryw@athena owner-editors: glenda@hera
The sendmail command does not use directly the alias definitions in the local system /etc/mail/aliases file. Instead, the sendmail command reads a processed database manager (dbm) version of the /etc/mail/aliases file. You can compile the alias database using one of the following methods:
/etc/mail/aliases.db
(Versions earlier than AIX 5.1 created two database files, /etc/aliases.dir and /etc/aliases.pag.)
Notes:
- If these files do not exist, the sendmail command cannot process mail and will generate an error message.
- If you have multiple alias databases specified, the -bi flag rebuilds all the database types it understands (for example, it can rebuild Network Database Management (NDBM) databases but not NIS databases).
The /etc/netsvc.conf file contains the ordering of system services. To specify the service ordering of aliases, add the following line:
aliases=service, service
where service can be either files or nis. For example:
aliases=files, nis
tells the sendmail command to try the local alias file first; and if that fails, try nis. If nis is defined as a service, it should be running.
For further information on the /etc/netsvc.conf file, see AIX 5L Version 5.2 Files Reference.