On 9 Oct, Timothy J. Luoma wrote:
|
| I have several email addresses listed in a variable declaration in
.procmailrc such as this:
|
| ME=(luomat(_at_)peak\(_dot_)org|tj_luoma(_at_)my-deja\(_dot_)com)
|
| What I am trying to do is filter out messages which are NOT sent ONLY to $ME.
|
| Sounds easy enough (check for the presence of a comma), but the problem is
that sometimes people will use several different email addresses in $ME, so it
is still to $ME and just to $ME but to several addresses listed there.
|
| [...]
Tested lightly only, but seems to be ok under various conditions where
either, none, or both of your addresses appear in either, none, or both
the To: and Cc: headers (including multiple appearances of the same
address).
:0
* ^To:\/.*
* 1^1 MATCH ?? @
* $ -1^1 MATCH ?? $ME
{ xTONUM = $= }
:0
* ^Cc:\/.*
* 1^1 MATCH ?? @
* $ -1^1 MATCH ?? $ME
{ xCCNUM = $= }
:0
* $ ${xTONUM:-0}^0
* $ ${xCCNUM:-0}^0
{ LOG = "$= more than me$NL" }
:0 E
{ LOG = "just me$NL" }
| The timestamp on this message is probably fast. If this annoys you, please
email support(_at_)peak(_dot_)org and add your complaint. I've already sent
mine.
So is mine. But there's no one to blame but me. :-(
[Note: user name "procmail" in email address is no good. Apologies, but
spammers' harvesting of addresses from the list archives is ooc.
"procmail6" will work if necessary.]
--
/"\
Don Hammond \ / ASCII Ribbon Campaign
Raleigh, NC US X Against HTML Mail,
/ \ and News Too
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail