Linux Mail Forwarding
If you want to forward mail on a linux machine that you happen to have an account on, follow these simple steps.
touch ~/.forward chmod 644 ~/.forward vi ~/.forward
Contents of ~/.forward should be a comma or newline separated list of email addresses to forward mail to. The following are correctly formatted: .forward files and a brief description of each.
Forward all local email to email@example.com:
email@example.com
Forward all local email to both email@example.com and alternate@domain.com:
email@example.com, alternate@domain.com
Use the local mail spool, keep a copy in the user’s ~/archive/mail file, and forward a copy to email@example.com:
\user, "/home/user/archive/mail", email@example.com
The permissions of the .forward file must be read-only for group and other. Failure to secure your .forward file will cause sendmail to ignore its existence.
GOTCHA!
