Installing and Administering Internet Services

128 Chapter 4
Installing and Administering sendmail
Creating sendmail Aliases
Creating sendmail Aliases
The sendmail aliases database stores mailing lists and mail aliases. You
create the aliases database by adding aliases to the file
/etc/mail/aliases and then running the newaliases script to
generate the database from the file. The generated database is stored in
the file /etc/mail/aliases.db. The sendmail startup script also
generates the aliases database when you reboot your system.
Each user on your system can create a list of alternate mailing addresses
in a .forward file in his or her home directory. The .forward file allows
the user to forward his or her own mail to files or to other mailing
addresses.
This section contains the following task-related subsections:
Adding sendmail Aliases to the Alias Database” on page 128
“Verifying Your sendmail Aliases” on page 132
“Managing sendmail Aliases with NIS or NIS+” on page 132
“Rewriting the “From” Line on Outgoing Mail” on page 133
“Forwarding Your Own Mail with a .forward File” on page 134
Adding sendmail Aliases to the Alias Database
1. If the file /etc/mail/aliases does not exist on your system, copy it
from /usr/newconfig/etc/mail/aliases to
/etc/mail/aliases.
2. Use a text editor to add lines to the file. Each line has the following
form:
alias: mailing_list
where alias is a local address, local user name, or local alias, and
mailing_list is a comma-separated list of local user names or aliases,
remote addresses, file names, commands, or included files. Table 4-1
lists the types of things you can include in a mailing list and the
syntax for each one.
3. Issue the following command to regenerate the aliases database from
the /etc/mail/aliases file: