forward(4)forward(4)NAMEforward - forward mail
The .forward file allows a user to forward messages to another host, or
to invoke programs (such as vacation(1)) to process their mail. It is
formatted as a series of comma-separated addresses in the form: addr_1,
addr_2, ... Alternatively, each address can be on a separate line.
The newer sendmail.v8 program also allows the use of comments (lines
that begin with a ``#'') and blank lines.
As with the aliases(4) file, mail messages can be forwarded to another
host or given to programs for further processing. The following is an
example of the vacation program. Assuming that the user's name is myra,
create a .forward file and add the following line: \myra,
The previous example forwards mail to myra (the backslash prevents an
accidental aliasing loop), and also sends a copy of the message to the
For security reasons, the file must be owned by the user or by root and
it should be writable only by the file owner. In addition, the file
must be readable by the owner (myra) or root.
On traditional systems, only the $HOME/.forward file is checked. The
sendmail.v8 program allows the use of the system-wide forwarding direc‐
tory /var/adm/forward. By default, this directory is checked for a
forward file prior to examining the users $HOME directory.
System-wide forwarding file. The per-user forwarding file.
The sendmail command can hang trying to read the user's $HOME/.forward
file. If the user's home directory is NFS-mounted and temporarily
unavailable, sendmail will stall until the directory becomes available
again. The use of non-NFS mounted directories for the forwarding of
files is recommended.
The use of /var/adm/forward is supported only by sendmail.v8.
The actual path for /var/adm/forward is configurable in the sendmail.cf
Incorrect file permissions/ownership are quietly ignored.
It is easy to create an accidental loop, for example, on host_a
myra@host_b and on host_b myra@host_a
Commands: aliases(4), sendmail.cf(4), sendmail(8) delim off