procmail
[Top] [All Lists]

Re: recipe to match multiple recipients (say > 4)

2002-04-12 08:54:27
On Fri, 12 Apr 2002, Eric Smith wrote:

How could I do that?  Recipints either in the To: or Cc:.

I think you have to count the recipients in each header separately.
Something like this (assumes each address contains one `@' sign, you can
make a more complicated regex for what constitutes a recipient):

:0
* ^To:\/.*
* 1^1 MATCH ?? @
{ }

:0
* ^Cc:\/.*
* $ $=^0
* 1^1 MATCH ?? @
{ }

:0
* $ $=^0
* -4^0
{
 LOG="More than 4 recipients in To/Cc
"
}

The "$ $=^0" lines are to propagate the score so far from the previous 
recipe.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>