aliases - aliases file for sendmail


This file describes user ID aliases used by /usr/sbin/sendmail. The file resides in /etc/mail and is formatted as a series of lines of the form

name: address[, address[...]]

The name is the name to alias, and the address is an alias for that name. The address can be another alias, a local user name, a local file name, a command, an include file, or an external address.

Local user name
The username must be available through getpwnam(2).
Local file name
username /path/name
Messages are appended to the file specified by the full path name (starting with a slash [/])
A command starts with a pipe symbol (|); it receives messages through standard input.
Include file
:include: /path/name
The aliases in path name are added to the aliases for name.
E-mail address
An e-mail address in RFC 822 format.

Lines beginning with white space are continuation lines. Another way to continue lines is by placing a backslash directly before a newline. Lines beginning with # are comments.

Aliasing occurs only on local names. Loops can not occur, since no message will be sent to any person more than once.

After aliasing has been done, local and valid recipients who have a .forward file in their home directory have messages forwarded to the list of users defined in that file.

This is only the raw data file; the actual aliasing information is placed into a binary format in the file /etc/mail/aliases.db using the program newaliases(1). A newaliases command should be executed each time the aliases file is changed for the change to take effect.