On Tue, 14 Jan 1997 12:12:42 -0500 (EST),
Paul O Bartlett <pobart(_at_)access(_dot_)digex(_dot_)net> wrote:
On Mon, 13 Jan 1997, era eriksson wrote (excerpt):
The ^TO macro is special -- don't use a wildcard after it. You might
also want to check in the manual whether you'd actually prefer the
^TO_ macro instead (if your Procmail is new enough).
At what version and/or patch level do these features of TO and TO_
first appear? My ISP's version is 3.10. I use a wildcard after ^TO
in recipes merely to filter incoming mail into various mailboxes, and
somewhere along the line I got the idea that for certain mailing lists
I needed to add a recipe for ^Cc: to catch everything from those lists.
The point is that the wildcard and the Cc: case are "built in" in the
^TO and ^TO_ macros. What I was trying to say was that ^TO_ will not
exist in older versions of Procmail -- but if you can find it in the
manual, your copy is new enough :-)
The differences between ^TO and ^TO_ are not all that big, but
they're spelled out clearly in the manual anyway so I won't reiterate
here.
The important thing is to realize that ^TO and ^TO_ are built-in
syntactic sugar to cater for all possible variations of something like
"^(Resent-)?(To|Cc|Whatever):[ ]*" -- they're not as complex as they
seem once you understand this. They're more complicated than this
example because they include a lot of other special cases besides
(Resent-)? but this is the basic idea.
(And note that this simplified version already contains the
"implicit wildcard" I'm talking about, in the form of "[ ]*".
{That's a character class containing space and tab.}
Adding a ".*" wildcard after an expression like this is not only
redundant, it will actually nullify the effects of more qualified
wildcard already built in. That's why ^TO_info is better than
^To:.*info because the latter will match abcinfo or whatever, whereas
the former won't.
/* era */
Oh well, here's the manual [procmailrc(1)]:
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.
If the regular expression contains `^FROM_DAEMON' it will be substituted by
:
:
--
See <http://www.ling.helsinki.fi/~reriksso/> for mantra, disclaimer, etc.
* If you enjoy getting spam, I'd appreciate it if you'd register yourself
at the following URL: <http://www.ling.helsinki.fi/~reriksso/spam.html>