The aliases(5) File
The aliases(5) file is one of several sources that can supply system mail aliases. We describe it first because it is the most traditional and because it illustrates the syntax and limitations common to all techniques.
The aliases(5) file is composed of lines of
text. Any line that begins with a #
is a comment
and is ignored. Empty lines (those that contain only a newline
character) are also ignored. Any line that begins with a space or a
tab is joined (appended) to the line above it. All other lines of
text are viewed as alias lines. The format for an alias line is:
local: alias
The local
must begin a line. It is an address in
the form of a local recipient address (we will discuss this in more
detail soon). The colon follows the local
on the
same line and can be preceded with spaces or tabs. If the colon is
missing, sendmail prints and
syslog(3)’s the following error
message, and skips that alias line:
missing colon
The alias
(to the right of the colon) is one or
more addresses on the same line. Indented continuation lines are
permitted. Each address should be separated from the next by a comma
and optional space characters. A typical alias looks like this:
root: jim, sysadmin@server, gunther ↑indenting whitespace
Here, root
is the local address to be aliased.
When mail is to be locally delivered to root
, it
is looked up in the aliases(5) file. If found,
root
is replaced with the three addresses shown earlier, and mail is instead delivered to those other three ...
Get Sendmail, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.