Installing and Administering Internet Services

134 Chapter 4
Installing and Administering sendmail
Creating sendmail Aliases
Forwarding Your Own Mail with a .forward
File
You can redirect your own mail by creating a .forward file in your home
directory. If a .forward file exists in your home directory and is owned
by you, sendmail will redirect mail addressed to you to the addresses in
the .forward file.
A .forward file can contain anything that can appear on the right side
of an alias definition, including programs and files. (See Table 4-1 earlier
in this chapter.) Following is an example of a .forward file owned by
user alice on host chicago:
alice@miami, alice@toronto, \alice, mycrew
Mail sent to alice@chicago will be delivered to alices accounts on
hosts miami and toronto as well as to her account on local host
chicago. It will also be delivered to all the recipients of the mailing list
mycrew, which must be defined in the local aliases database or in an
:include file on host chicago.
The aliases database is read before a .forward file. The .forward file
is read only if the user’s name is not defined as an alias or if an alias
expands to the user’s name.