[Techtalk] getting /var/mail/{whatever} forwarded externally

Kathryn Hogg kjh at flyballdogs.com
Mon Jun 26 04:06:38 UTC 2006


Lucia Sanchez wrote:
> The redirect through /etc/aliases works with postfix, but you'd have to
> see if that is the appropriate file for other MTAs (for example, qmail
> used something completely different).
>
> If you want to keep a local copy for the user user, you usually edit a
> .forward file in that user's home directory that looks like this:
>
> user
> forwarding_email1 at something.com
> forwarding_email2 at something.com

Just a warning, forwarding to another domain can and will break SPF.  It
will make it look like your IP is sending email spoofing as the original
sender. If the receiver is doing SPF checks, it will probably fail.

If your MTA uses procmail for local delivery, you can forward emails by
putting this in ~user/.procmailrc

# loop protection
:0 fw
* !^X-Loop: user at domain.com
| /usr/bin/formail -A'X-Loop: user at domain.com'

:0 A
{
    :0
    * !^FROM_DAEMON
    ! user at domain.com
    :0 B
    * !user at domain.com
    ! user at domain.com
}


-- 
Kathryn
http://womensfooty.com



More information about the Techtalk mailing list