Installing and Administering Internet Services

138 Chapter 4
Installing and Administering sendmail
How sendmail Works
The aliasing facility or a user’s .forward file may be used to route mail
to programs and to files. (sendmail does not mail directly to programs or
files.) Mail to programs is normally piped to the prog mailer
(/usr/bin/sh -c), which executes the command specified in the alias
or .forward file definition. (You can restrict the programs that can be
run through the aliases or .forward files. See “Security” on page 151
for more information.) Mail to a file is directly appended to the file by
sendmail if certain conditions of ownership and permission are met.
After all alias expansion is complete, mail that is addressed to a local
user name is routed to the local mailer (/usr/bin/rmail), which
deposits the message in the user’s mailbox.
The Default Routing Configuration
The installed configuration file, if unmodified, routes mail depending on
the syntax of the recipient addresses as described in the following
sections.
Local Addresses. The following forms are recognized as local
addresses and are delivered locally:
user
user@localhost
user@localhost.localdomain
user@alias
user@alias.localdomain
user@[local_host’s_internet_address]
localhost!user
localhost!localhost!user
user@localhost.uucp
UUCP Addresses. Where host is not the local host name, addresses of
the following forms are recognized as UUCP addresses:
host!user
host!host!user
user@host.uucp