ALIASES(5) BSD File Formats Manual ALIASES(5)
aliases — aliases file for smtpd
This manual page describes the format of the aliases file, as used by
smtpd(8). An alias in its simplest form is used to assign an arbitrary
name to an email address, or a group of email addresses. This provides
a convenient way to send mail. For example an alias could refer to all
users of a group: email to that alias would be sent to all members of
the group. Much more complex aliases can be defined however: an alias
can refer to other aliases, be used to send mail to a file instead of
another person, or to execute various commands.
Within the file, ‘#’ is a comment delimiter; anything placed after it
is discarded. The file consists of key/value mappings of the form:
key: value1, value2, value3, ...
key is always folded to lowercase before alias lookups to ensure that
there can be no ambiguity. The key is expanded to the corresponding
values, which consist of one or more of the following:
user A user on the host machine. The user must have a valid entry
in the passwd(5) database file.
/path/to/file
Append messages to file, specified by its absolute pathname.
|command
Pipe the message to command on its standard input. The command
is run under the privileges of the daemon's unprivileged
account.
:include:/path/to/file
Include any definitions in file as alias entries. The format
of the file is identical to this one.
user-part@domain-part
An email address in RFC 5322 format. If an address extension
is appended to the user-part, it is first compared for an exact
match. It is then stripped so that an address such as
user+ext@example.com will only use the part that precedes ‘+’
as a key.
error:code message
A status code and message to return. The code must be 3 dig‐
its, starting 4XX (TempFail) or 5XX (PermFail). The message
must be present and can be freely chosen.
/etc/mail/aliases Default aliases file.
smtpd.conf(5), makemap(8), newaliases(8), smtpd(8)
The aliases file format appeared in 4.0BSD.
This page is part of the OpenSMTPD (a FREE implementation of the
server-side SMTP protocol) project. Information about the project can
be found at https://www.opensmtpd.org/. If you have a bug report for
this manual page, see ⟨https://github.com/OpenSMTPD/OpenSMTPD/issues⟩.
This page was obtained from the project's upstream Git repository
⟨https://github.com/OpenSMTPD/OpenSMTPD.git⟩ on 2020-08-13. (At that
time, the date of the most recent commit that was found in the reposi‐
tory was 2020-07-27.) If you discover any rendering problems in this
HTML version of the page, or you believe there is a better or more up-
to-date source for the page, or you have corrections or improvements to
the information in this COLOPHON (which is not part of the original
manual page), send a mail to man-pages@man7.org
BSD April 23, 2020 BSD
Pages that refer to this page: endaliasent(3) , getaliasbyname(3) , getaliasbyname_r(3) , getaliasent(3) , getaliasent_r(3) , setaliasent(3) , mailaddr(7)