locking w/ whitelisting
David Relson
relson at osagesoftware.com
Wed Mar 26 03:06:56 CET 2003
At 08:52 PM 3/25/03, Barry Gould wrote:
>Hi David,
>
>I'm not really worried about corruption (I understand bogofilter locks well.)
>
>Actually, I was worried that procmail might launch both bogofilter threads
>at once, since I'm using the copy (c) directive in procmail to make a copy
>and process it.
>In which case, the bogofilter -n might not be done before the other
>bogofilter started, causing the whitelisting to be ignored _for the
>current message_.
>i.e., a possible false positive.
>
>Maybe I'm wrong? (does procmail parallelize or run everything serially?
>IIRC, it will parallelize when it doesn't need to wait for the result of
>something.)
Barry,
Serialize or parallellize? Sounds like a question for a procmail mailing list.
You could have procmail apply a procmail lock when running
bogofilter. Roughly something like:
:0c:/tmp/bogofilter.lock
...whitelist
bogofilter -n
:0:/tmp/bogofilter.loc
bogofilter -p -e
Guaranteeing that "bogofilter -n" is done before "bogofilter -p -e" doesn't
prevent false positives. Remember that bogofilter uses token count ratios
in its scoring. If a whitelisted user sends the "Hey Barry, look at this
quintuple-X p0rno sp4m I got", the message may well be rated spam. If you
want a whitelist match to skip the spam classification, you need something
like:
:0
* ? whitelist
{
:0c
| bogofiltere -n
}
:0E
| bogofilter -p -e
This is a rough approx of what's needed. See file
contrib/procmailrc.example for real code.
David
More information about the Bogofilter
mailing list