procmail
[Top] [All Lists]

Re: Scoring Recipe for repeating addresses?

2002-06-18 15:09:43
* 1^1 ^(To|Cc):.*<postmaster(_at_)[-a-z0-9_]+\(_dot_)

[...]

Would that actually count each occurance in the To/Cc headers?
Seems too easy ...

Sadly that *is* too easy.  That would count the number of header lines
containing postmaster, not the number of postmasters in those lines.

Here's a slightly more involved variation on my previous suggestion:

  :0
  * ^TO_\/postmaster(_at_)(_dot_)*
  {
    :0
    * -4^0
    * 1^1 MATCH ?? \<postmaster@
    review(_at_)example(_dot_)com
  }

which will match if a To: or Cc: (or similar) header contains 5 or more
'postmaster@' lines.  The scoring part is only invoked if there is a
line with 'postmaster@' in it.

This *won't* match if a To: line contains 3 postmaster addresses and a
Cc: line containes 3 postmaster addresses....just if many are in one
line.

Martin
-- 
Martin McCarthy                 /</    http://procmail.non-prophet.org
    `Procmail Companion'        \>\
     Addison Wesley             /</                  PGP key available
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail