Re: forwarding messages
Andrew Kelly <[email protected]>
| Newsgroups | gmane.linux.redhat.release.enigma |
|---|---|
| Organization | Transparency International |
| Message-ID | <[email protected]> |
Armando Ferreira wrote: > > Hi, > > How can i automatically forward all the messages incoming to some users > to another mail box? I've a remote idea that this is done with a file > .forward in user home directory, but no idea about the content. > Anyone can help me? The easiest way to do this is to take care of it it in the alias file. If mail for USER should be forwarded to [email protected], make an entry in the aliase file (/etc/aliases or /etc/mail/aliases generally) that looks like USER: [email protected] When you've saved and closed the file, call sendmail -bi or use the newaliases script. Doing your forwarding this way saves a call to the MDA. The negative is that mail passes through and no local copy is left. To forward mail and keep a local copy it's best to use the .forward file. If the contents of .forward were [email protected] the same would be accomplished as in the first example, namely that no local copy of the mail will be kept. To keep a local copy, .forward should contain \USER, [email protected] Andrew