On 27 May 1999, Jessie Kleefstra
<kleefstr(_at_)mcmail(_dot_)cis(_dot_)McMaster(_dot_)CA>
wrote:
[...]
1. ^TO - This will match "To:","Cc:", "Bcc" (This one doesn't make
sense.Bcc)
Is the above statement completely true?
Depending on your definition of "completely true", it may or may not
be so. It will match "To:", "Cc:" and "Bcc:" headers, yes. It will
also match other things, like "X-Envelope-To:" and "Apparently-To:".
You are strongly encouraged to upgrade to a procmail version that has a
^TO_ macro (v3.13.1 is the latest, and it's rock solid), and use ^TO_
instead of ^TO. Basically, ^TO_ is a saner version of ^TO, and is more
likely to do what you expect.
On a related topic, please note that some messages do contain "Bcc:"
headers. The most common situations are:
(1) messages in your "fcc" folder;
(2) messages sent by (broken) mailers that don't remove the "Bcc:"
headers;
(3) messages sent by mailers that are trying to be smart and remove the
"Bcc:" headers only for the recipients not in the "Bcc:" list.
2. ^FROM (as apposed to ^From:) - Checks "From:", "Resent-by" and
similar header lines. True or False.
[*Sigh*] False, please RTFM. Unlike ^FROM_DAEMON and ^FROM_MAILER,
^FROM has no special meaning. If you are doing case-insensitive
matching, it will match "From " and "From:" lines, and that's all.
3. # This will match on mail from joe@ any machine and toss it into
# /dev/null
:0
* ^From:.* joe(_at_)(_dot_)*
/dev/null
Do you really need the ".*" at the end of joe(_at_)(_dot_)
No.
One documentation did the recipe like this
Which one? I can't find that in the man pages.
and another documentation said the ".*" at the end was redundant.
In this particular situation, it is. It isn't if you're doing
something like:
:0
* ^From:(_dot_)*joe(_at_)\/.*
{ DOMAIN=$MATCH }
Would someone please also explain to me exactly what this recipe will
match on and what it will not?
It will match
From: joe(_at_)domain(_dot_)org
It won't match
From: Joe Smith <joe(_at_)domain(_dot_)org>
because you're asking for "joe@" preceded by a space. What you probably
want is something like:
From:.*\<joe@
Regards,
Liviu Daia
--
Dr. Liviu Daia e-mail: Liviu(_dot_)Daia(_at_)imar(_dot_)ro
Institute of Mathematics web page: http://www.imar.ro/~daia
of the Romanian Academy PGP key: http://www.imar.ro/~daia/daia.asc