From: Stephen Hill <nugrange(_at_)best(_dot_)com>
On Wed, 14 Feb 2001, S.Toms wrote:
While you are at it ^TO will only catch the TO: header, whereas TO_ would
also catch Resent-to, Apparently-to, etc., so it is probably the better
one to use. (NB: TO_ was only implemented in the newer versions of
procmail, I believe in 3.11 or higher, so make sure which version you are
using.)
Heh. 3.11 is 1997 - not exactly "newer." (I'm writing this from a
system that still uses 3.11pre7, though. Myself, if I had the power,
I would upgrade it.)
Anyway, I wrote to say you are mistaken in your description of ^TO.
And that you left off the all-important leading caret in ^TO_.
The caret is not a line-begin marker but part of a regex variable name.
From man procmailrc:
MISCELLANEOUS
If the regular expression contains `^TO_' it will be substituted by
`(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To)
:(.*[^-a-zA-Z0-9_.])?)', which should catch all destination specifications
containing a specific address.
If the regular expression contains `^TO' it will be substituted by
`(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To)
:(.*[^a-zA-Z])?)', which should catch all destination specifications
containing a specific word.
Pretty similar, actually. Basically, the last two lines are the only
differences. Using an example,
Apparently-To: "Dallman Ross" <dman(_at_)notnetcom(_dot_)com>
I could match that line with either
^TOdallman
or
^TOdman
But if I use ^TO, I'll need to use (part of) the actual email address
for a match:
^TOdman
Will work.
(It will also match "Cc: dmandel(_at_)bogus(_dot_)com", btw, so some thought
needs to be put into what one asks for.)
--
Netcom has imploded. Please now use NOTnetcom.com for mail.
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ex-Netcommies: Mail "forwards" for free forwarding service!
NOT affiliated with EarthLink, Inc.'s Netcom brand identity.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail