COHERENT manpages

This page displays the COHERENT manpage for .forward [Set a forwarding address for mail].

List of available manpages
Index


.forward -- System Administration

Set a forwarding address for mail

The file $HOME/.forward lets you automatically redirect your incoming mail.
You can redirect mail to one or more other users, who are located either on
your local  machine or on a  remote site; or you can  redirect your mail to
one  or more  programs on  your local machine,  for further  processing; or
both.   As you  can see,  this  feature of  the mail  system included  with
COHERENT gives you great flexibility in processing your mail.

For example, you may wish to  forward to another user any mail that is sent
to the superuser root, so you can handle it immediately.  (If you don't, it
will languish  in root's mailbox until  someone logs in as  root, which may
not  happen for  days.) To  forward  root's mail  to user  fred, place  the
following line into file /.forward:

    fred

Thereafter,  whenever   mail  is  sent  to  root,   it  will  be  forwarded
automatically to user fred.

For another example,  suppose that you are going on  vacation, and you want
your mail  to be forwarded  both to user fred  and to user anne.  To do so,
insert the following instruction into file $HOME/.forward:

    fred, anne

Thereafter, the  route-mail program  rmail will send  a copy of  every mail
message you  receive to fred and  to anne. Please note  that rmail will not
insert a copy into your mailbox: if you forward your mail, you will not see
it.

For another example,  suppose that user fred has an  account on each of two
systems: one  called acme.com and  the other zenith.com.  Suppose, further,
that he logs into acme.com regularly,  but he logs into zenith.com only now
and again.  This user probably would  want to route any mail he receives on
zenith.com to acme.com, so he will  see it immediately.  To do so, he would
put the following instruction into file $HOME/.forward on zenith.com:

    fred@acme.com

Thereafter,  all mail  sent to  address  fred@zenith.com will  be forwarded
automatically to fred@acme.com.

Please note that it is illegal  to include in .forward the name of the user
whose mail  is being forwarded, because  it causes an infinite  loop in the
mail system.  For example, writing

    fred, anne, root

into root's .forward  file causes any message sent to  root to be forwarded
to fred, anne,  and root; the copy forwarded to  root is again forwarded to
fred, anne, and root; and so on, ad infinitum.

You can also embed the name of a program with your .forward file.  All mail
sent to  your account will be  handed to this program  for processing.  For
example, the elm mailer includes a  program called filter, which a user can
program to  read his mail  and throw away  unwanted messages.  If  you have
installed elm  onto your system,  you can turn  on filter by  embedding the
following command into file $HOME/.forward:

    "|/usr/local/bin/filter"

Note that  the command must  be preceded by  a `|' symbol;  this is because
filter receives  its input from  the standard input, which  is the standard
method for programs  that filter text or mail.  Note,  too, that the entire
command must be enclosed within quotation marks.

See Also

Administering COHERENT,
mail [overview],
smail