DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SMM:08-20
Sendmail Installation and Operation Guide
name: name1, name2, ...
Only local names may be aliased; e.g.,
eric@prep.ai.MIT.EDU: eric@CS.Berkeley.EDU
will not have the desired effect (except on prep.ai.MIT.EDU, and they probably don't want me)
9
.
Aliases may be continued by starting any continuation lines with a space or a tab or by putting a
backslash directly before the newline. Blank lines and lines beginning with a sharp sign ("#") are
comments.
The second form is processed by the ndbm (3)
10
or the Berkeley DB library. This form is in
the file /etc/mail/aliases.db (if using NEWDB) or /etc/mail/aliases.dir and /etc/mail/aliases.pag (if
using NDBM). This is the form that sendmail actually uses to resolve aliases. This technique is
used to improve performance.
The control of search order is actually set by the service switch. Essentially, the entry
O AliasFile=switch:aliases
is always added as the first alias entry; also, the first alias file name without a class (e.g., without
"nis:" on the front) will be used as the name of the file for a ``files'' entry in the aliases switch. For
example, if the configuration file contains
O AliasFile=/etc/mail/aliases
and the service switch contains
aliases nis files
nisplus
then aliases will first be searched in the NIS database, then in /etc/mail/aliases, then in the NIS+
database.
You can also use
NIS
-based alias files. For example, the specification:
O AliasFile=/etc/mail/aliases
O AliasFile=nis:mail.aliases@my.nis.domain
will first search the /etc/mail/aliases file and then the map named "mail.aliases" in "my.nis.domain".
Warning: if you build your own
NIS
-based alias files, be sure to provide the -l flag to makedbm(8)
to map upper case letters in the keys to lower case; otherwise, aliases with upper case letters in their
names won't match incoming addresses.
Additional flags can be added after the colon exactly like a K line -- for example:
O AliasFile=nis:-N mail.aliases@my.nis.domain
will search the appropriate NIS map and always include null bytes in the key. Also:
O AliasFile=nis:-f mail.aliases@my.nis.domain
will prevent sendmail from downcasing the key before the alias lookup.
2.6.1. Rebuilding the alias database
The hash or dbm version of the database may be rebuilt explicitly by executing the com-
mand
newaliases
This is equivalent to giving sendmail the -bi flag:
9
Actually, any mailer that has the `A' mailer flag set will permit aliasing; this is normally limited to the local mailer.
10
The gdbm package does not work.