procmail
[Top] [All Lists]

RE: Duplicates sent from lists

2004-02-17 22:29:06


Anyway, once you have listpost.cache, you can do something like this:

* ? formail -xTo: -xCc: | \
      fgrep --word-regexp --fixed-strings "$(strings listpost.cache)"

(I haven't actually tested that in an rc file, but you get the idea.)
Adjust the size of the cache to be sure of not overflowing argument size
limits when expanding $(strings ...).  Needs GNU fgrep, I suppose.

Alternatively, a program might try and maintain a relatively small black
list (let's say 1000 or fewer user-id's) in INCLUDERC that looked something
like the following:

INCLUDERC=$HOME/.procmail/idcheck.rc

--- idcheck.rc ----


:0
* 9876543210^0 ^(To|Cc):(_dot_)*id1(_at_)addr1(_dot_)com
* 9876543210^0 ^(To|cc):(_dot_)*id2(_at_)addr2(_dot_)com
[...]
{ IDFOUND = yes }

-----

It might take a little doing to maintain this file, but probably one
formail piped into sed could get the job done. It'd be interesting to
see the trade-off between procmail's time to process the include file,
and the time for grep to fire up and run its pattern match over the
a address file.







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