procmail
[Top] [All Lists]

Re: CLEANTO anyone?

2004-05-30 02:19:30
On Sun, May 30, 2004 at 12:29:23AM -0400, Don Hammond wrote:
I think you can count the addresses with something as simple as:

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

That's fine if you're comfortable counting:

  To: "<guy1(_at_)place1(_dot_)tld>" <guy1(_at_)place1(_dot_)tld>

as two addresses.  That seems to be an all-too common format on
legitimate mail, to my dismay.


I found enough times that I wanted a clean list of addresses as
you describe, that I started running a perl one-liner on both the
To: and Cc: headers.
...
I make no representation that it's perfect, but it seems to work
ok for gubermint work, as long as you're not adverse to wielding
the perl sledge hammer.  It can be viewed here:

http://www.xray.mpe.mpg.de/mailing-lists/procmail/2003-09/msg00199.html

I'll confess I don't read perl well enough to know if your one-liner
ignores the comment fields; that is, would it count my example above
as just one address?

Thanks for the pointer.

Jim

_______________________________________________
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>