procmail
[Top] [All Lists]

Re: redirecting while keeping a copy

2003-09-12 05:54:38
On 12 Sep 2003 René Mølsted (molsted(_at_)mgraphics(_dot_)dk) wrote:
I need to redirect all mail for a specific mail address to a remote
mailserver but keeping a local copy.
It is very important the header is intact on both servers.
I would prefer to fix it within procmailrc.

First, in order to do this you need to get the envelope recipient
from the MTA. I talk about this and headers that are sometimes
used to record this info here:

 <http://www.ii.com/internet/robots/procmail/qs/#envelope>

If your MTA does this, you can *possibly* use a recipe similar to
the following.


 :0
 * ^Delivered-To: userX(_at_)example(_dot_)com
 {
   :0 c
   .--routed2userX/

   :0
   ! userX(_at_)alternateExample(_dot_)com
 }


I use a recipe like this on a system that uses qmail as the MTA
and a Courier IMAP server.

When you test this make sure that you test *mailing-list
messages* that are sent to userX(_at_)example(_dot_)com, *other messages
that are Bcc'd* to userX(_at_)example(_dot_)com, and *one message that is
simultaneously sent to multiple users* (e.g. userX, userY, and
userZ) @example.com. There are lots of things that can (and do)
go wrong when you try to use Procmail as an MTA.

Hope this helps,
Nancy

-- 
Nancy McGough            <http://www.ii.com>            Infinite Ink
Writing about procmail, imap, pine, spam-deflexion strategies & more

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


<Prev in Thread] Current Thread [Next in Thread>