problem using bogofilter

David Relson relson at osagesoftware.com
Thu Jun 23 13:18:00 CEST 2005


On Thu, 23 Jun 2005 11:39:56 +0200
Asaf cs wrote:

> Hello,
> 
> I am using Bogofilter version 0.94.4
> I have about 400 ham messages and 800 spam messages.
> I have trained Bogofilter with spam & ham mbox with the following code:
>     bogofilter -s < spam.mbox
>     bogofilter -n < ham.mbox
> 
> The bogofilter is used in .procmailrc as followed:
>     :0fw
>     | /usr/bin/bogofilter -u -e -p
> 
>     :0 H
>     * ^X-Bogosity: Yes, tests=bogofilter
>     {
>         SOMETHING
>     }
> 
> I get all the time that X-Bogosity YES, and spamcity is very close to 1.
> 
> What can I do?
> 
> thank you

Asaf,

The "-u" option tells bogofilter to classify each message then register
it (add its tokens to the wordlist) according to the classification.
There's an assumption here that bogofilter is right in its
classification.  Unfortunately it isn't always right.

When using "-u", it's necessary to watch for classification errors,
i.e. false positives which are ham classified as spam and false
negatives which are spam classified as ham.  When an error does occur,
you _must_ correct it.  The correction is a two-part action.  For a
false positive, one tells bogofilter that the message is _not_ spam and
that it _is_ ham.  The flags for correcting are:

  for a false positive, use "bogofilter -Sn -v < message"
  for a false negative, use "bogofilter -Ns -v < message"

When first running bogofilter, it's necessary to closely monitor and
correct all classification errors.

Note:  A smart thing to do would be to rebuild your wordlist from the
beginning, i.e.

    rm ~/.bogofilter/wordlist.db
    bogofilter -v -s < spam.mbox
    bogofilter -v -n < ham.mbox

and also change the procmail rule to:

   | /usr/bin/bogofilter -e -p

With this setup, you'll have a fresh start and there will be _no_
automatic updates to the wordlist.  As messages come that are
classified wrong, train bogofilter with them (individually):

    bogofilter -v -s < new.spam
    bogofitler -v -n < new.ham

or in batches:

    bogofilter -v -s < new.spam.mbox
    bogofilter -v -n < new.ham.mbox

HTH,

David





More information about the Bogofilter mailing list