user AND global databases? (was: UI for correcting mistakes)

elijah elijah at riseup.net
Sat Mar 15 03:09:41 CET 2003


On Thu, 13 Mar 2003, Todd Underwood wrote:

> ...
> most people implementing bogofilter for their client base are either
> going to do a sitewide filtering database (poor scaling, less accuracy,
> not as cool), or per-user databases.
> ...

I have been wondering about that. Has anyone had success doing both?

I was hoping to do this:

- incoming messages are bogofiltered using a global database
  the cutoff is set loose, to create more unsure results.

- if the result is unsure, then run bogofilter using
  a user's private database. the cutoff is set tighter.

- if the result is yes to either one, mark message as spam.

I read in the todo that there is some plan to support multiple databases
in one pass. How far away is this? Should I just not bother and wait for
this feature? Would this feature be useful for combining global and user
databases?

Both bogofilter passes could be -u. Alternately, whenever a user's private
database is update, also update the global.

-elijah

p.s.

here is a maildrop filter to do this that i am playing with:

SHELL="/bin/ash"
BOGO="bogofilter"
logfile "/var/log/maildrop"

exception {
    # if user has a filterspam file then...
    if (`test -e $DEFAULT/filterspam && echo YES`)
    {
        # filter using global database
        xfilter "$BOGO -e -p -d /var/bogofilter"
        if (/^X-Bogosity: Yes/)
        {
            SPAM='true'
        }
        else
        {
            if (/^X-Bogosity: Maybe/)
            {
                # filter using private database
                xfilter "$BOGO -e -p -d $HOME"
                if (/^X-Bogosity: Yes/)
                {
                    SPAM='true'
                }
            }
        }
        if($SPAM)
        {
            xfilter "subjadd '** SPAM? **'"
            exception {
                to "$DEFAULT/.spam"
            }
        }
    }
}






More information about the Bogofilter mailing list