procmail
[Top] [All Lists]

Re: kook blocker (message-id chain filter)

2002-12-05 11:35:30

On Thu, Dec 05, 2002 at 08:56:26AM -0500, Bennett Todd wrote:

2002-12-05-05:47:16 Paul Chvostek:
All this sounds good, but when did procmail get an fgrep?

It didn't. Fgrep offers functionality different from procmail's
regexp matcher; it is designed to efficiently match against any one
of a large number of different fixed strings. So call out to the
external fgrep from procmail to do this check.

Well, yeah.  But you talked about "fgrep from procmail".  I thought you
were talking about something that ships with procmail.  Did you just
mean that fgrep should be launched from within the procmailrc?  (What's
clear to you is clear to you.)

Did you read my original post?  I did say that I was using `grep -Ff`.
The actual recipe, at http://www.it.ca/software/procmail-filter-msgid,
also would have let you see what I was doing.

procmail processing). I wouldn't be so keen on doing it on a big
multi-user server where the difference between 20 msgs/sec delivery
and 2 secs/msg delivery is really urgent.

This is why my current script only bothers looking anything up if it
sees that the message is on a particular set of mailing lists.  It's not
enough to recognize the kook's message-id and then check *every* single
subsequent message for inclusion in the chain.  That would be a huge
load on even a modest mail server.

If I wanted to offer this kind of thing on a high-performance basis,
I suspect I'd do it in Lua,

I'm going to stick with procmail for as much as I can on this one.  I
already launch procmail once per message, and the more I can avoid
launching sub-processes, the better.  So perhaps we're talking about
three fgreps, the second two conditional on success of the first.  The
procedure would be ...

- wrap in a recipe that looks for ^List-ID: in header,
- fgrep to match a ^List-ID that contains kook chains.  If true,
- fgrep to match a kook's From address.  If false,
- fgrep to match a chained Message-ID.

-- 
  Paul Chvostek                                             
<paul(_at_)it(_dot_)ca>
  Operations / Abuse / Whatever                          +1 416 598-0000
  it.canada - hosting and development                  http://www.it.ca/


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