procmail & 3-state configuration

David Relson relson at osagesoftware.com
Mon Dec 22 19:38:26 CET 2003


On Mon, 22 Dec 2003 13:26:53 -0500 (EST)
Dave Lovelace <dave at firstcomp.biz> wrote:

> It looks like I need to lower my cutoff.  I'd really, REALLY rather
> not see any false positives get lost in the pile, though; what I'd
> like to do is use 3-state classification, route spam (high values) to
> one file(which I'd glance through as I now do), unsures to a second
> file (to be really looked at), and good mail (low values) to be
> delivered as usual.
> 
> I'm not a procmail expert.  I've read the various procmail man pages &
> some other stuff, as well as the bogofilter man page.  What I don't
> understand is how to do this without 2 separate passes through
> bogofilter, with no ham cutoff but with 2 different spam cutoffs.
> 
> It seems as though I ought to be able to assign the exit code from
> bogofilter to a variable, and then do numeric comparisons on that.  I
> haven't seen anything that helps me know how to do either part of
> this.  I suppose I could generate an X-Bogosity header & then grep
> (with procmail's builtin grep) for ".9" and ".8" and so forth, one
> after the other; this at least would be much, much faster than running
> bogofilter twice, but it seems to me there's got to be something
> better than that.
> 
> Does anyone do anything like this or know enough about procmail to
> offer help?  Thanks.

Dave,

Using the config file, you can set ham_cutoff and spam_cutoff values. 
Bogofilter's spam header line (generated when -p (passthrough) is used)
will then read:

  X-Bogosity: Yes, ...
  X-Bogosity: No,  ...
  X-Bogosity: Unsure, ...

If you'd prefer Spam, Ham, and Unsure the spamicity_tags option can be
used.  See bogofilter.cf.example for lots of examples of what can be
done.

For ham_cutoff and spam_cutoff values at the start you might want to use
convervative values like 0.2 and 0.8.  As you receive Unsures, observe
their scores and, at some future time, you can change the cutoff values.

Anyhow, once you've got the X-Bogosity: lines in the message header, a
good mail client will let you filter on "X-Bogosity: Yes" and
"X-Bogosity: Unsure" so those messages can be separated out.

More info on bogotune coming shortly :-)

David





More information about the Bogofilter mailing list