On Mon, Dec 02, 2002 at 08:22:22AM -0800, Professional Software Engineering
wrote:
At 06:58 2002-12-02 -0500, Paul Chvostek did say:
It's really a very simple filter, though it's potentially high load if
you're not careful about what you're checking. The biggest problem I
see is that I can't seem to think of a way to expire old items from the
message-id cache.
Formail doesn't have a _date_ based cache, but it does have a size based
one. Adjust the size to approximate your troll volume, and you should be
good to go.
Almost good to go. I looked at formail, but couldn't find an elegant
way to check for the existence of every cached message-id in the headers
of the message being analysed. Formail will tell me if a *particular*
message-id is in the cache, I don't see a way to make procmail loop
through a list of message-ids and check each one against formail.
Besides, if there's one In-Reply-To and a References line with three
entries, that would require launching formail *four* time for a single
message.
The solution was to build my own cache as a text file (i.e. newline
delimited instead of null delimited like formail's cache). A simple
`egrep -Ff` compares header lines to each line in the cache.
Or write up a perl helper utility that utilizes a simple db.
Ya, this would be easy, but it would make the tool dependent on things
not shipped with procmail, which is something I'd rather avoid.
I've never tried to read the formail messageid cache (since you want to
match it against an in-reply-to: or references: line), but it shouldn't be
too difficult.
No, it's simple, but formail doesn't do what `egrep -Ff` does. I could
even use it, adding to the cache with formail but comparing it with
egrep, if I could figure out a way to make egrep's -F option use
something other than newlines as field delimiters.
(BTW, wouldn't this more appropriateley be termed a trollfest blocker, in
that the original message is a kook/troll, but all the subsequent _replies_
to it are in effect, replies to the troll? Kooks don't inherently reply to
their own posts.)
I think I'll still with "Message-ID chain filter" as the official title,
but trollfest block is as good a colloquial descriptor as any. In the
case of the idiot whose posts prompted me to write this thing, he posts
anti-unix rhetoric which others can't resist shooting down. Or he
provides wantonly incorrect answers to questions posted, and a gaggle
of people chime in to chrrect him. His actions are trollish, but his
consistency make him a kook.
--
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