2 messages in net.sourceforge.lists.courier-maildropRE: [maildropl] a "TO" predefined var...
FromSent OnAttachments
Timothy WuMar 19, 2003 8:51 am 
Paul ChambersMar 21, 2003 4:47 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: [maildropl] a "TO" predefined variable?Actions...
From:Paul Chambers (mail@lists.bod.org)
Date:Mar 21, 2003 4:47:47 pm
List:net.sourceforge.lists.courier-maildrop

If you're using a recent version of postfix, it adds an 'X-Original-To' header that indicates the address postfix was originally asked to deliver this piece of mail to - before aliasing, virtual domains, etc.

I use a virtual subdomain for my mailing list subscriptions, and use the 'X-Original-To' header to route incoming mail to the right maildir.

The other tip is to limit the pattern match to the header only - append ':h' to the regex (it's mentioned in the maildrop docs).

Paul

if (/^To: (.*)ro@xxx.com/) { to "Maildir/.root/" }

So I could filter mails that sent to specifically root to a particular folder. (The mails under Postfix are redirected to an user account, so I need to single-handed out mails that are sent particularly to root.) I was afraid this pattern matching would make filtering much, much slower since it seems to imply sorting through the entire mail, header and body included, to find the string.