/etc/mail/aliases file

The properties, contents, and location of the /etc/mail/aliases file are described here.

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:

Item Description
MAILER-DAEMON The ID of the user who is to receive messages addressed to the mailer daemon. This name is initially assigned to the root user:
MAILER-DAEMON: root
postmaster The ID of the user responsible for the operation of the local mail system. The postmaster alias defines a single mailbox address that is valid at each system in a network. This address enables users to send inquiries to the postmaster alias at any system, without knowing the correct address of any user at that system. This name is initially assigned to the root user:
postmaster: root
nobody The ID that is to receive messages directed to programs such as news and msgs. This name is initially assigned to /dev/null:
nobody: /dev/null

To receive these messages, define this alias to be a valid user.

Whenever you change this file, you must recompile it into a database format that the sendmail command can use. See Alias database building.