RE: [maildropl] a "TO" predefined variable?
Brought to you by:
mrsam
From: Paul C. <mai...@li...> - 2003-03-22 00:47:53
|
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...@xx.../) > { > 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. |