how to train bogofilter using postfix

David Relson relson at osagesoftware.com
Tue Mar 21 01:29:50 CET 2006


On Mon, 20 Mar 2006 15:13:27 +0100
Christophe Journel wrote:

> Hi !
> 
> I found this in the FAQ :
> 
> How can I use SpamAssassin to train Bogofilter?
> 
> If you have a working SpamAssassin installation (or care to create one), you
> can use its return codes to train bogofilter. The easiest way is to create a
> script for your MDA that runs SpamAssassin, tests the spam/non-spam return
> code, and runs bogofilter to register the message as spam (or non-spam). The
> sample procmail recipe below shows one way to do this:
> 
> BOGOFILTER = "/usr/bin/bogofilter"
> BOGOFILTER_DIR = "training"
> SPAMASSASSIN = "/usr/bin/spamassassin"
> 
> :0 HBc
> * ? $SPAMASSASSIN -e
> #spam yields non-zero
> #non-spam yields zero
> | $BOGOFILTER -n -d $BOGOFILTER_DIR
> #else (E)
> :0Ec
> | $BOGOFILTER -s -d $BOGOFILTER_DIR
> 
> :0fw
> | $BOGOFILTER -p -e
> 
> :0:
> * ^X-Bogosity:.Spam
> spam
> 
> :0:
> * ^X-Bogosity:.Ham
> non-spam
> 
> 
> but my problem is.. i have only postfix, not procmail.
> is there a script somewhere on the internet i can use ?
> 
> thx

Christophe,

Why not install procmail (or maildrop)?  It's easy enough to do :->

It's not necessary to train bogofilter from postfix.  You can do it
from the command line quite easily.  Information is in the man pages
and the FAQ.

Regards,

David



More information about the bogofilter-dev mailing list