begin quote On Wed, 20 Aug 2003 09:54:36 +1000 blade- <[EMAIL PROTECTED]> wrote:
> Hi all, > > Its a OT but maybe someone knows anyway, > > I use spamassassin and have not been able to get bayes filter working > with it, after over 5000 spam messages I think it would be working by > now. So I have deceided to use bogofilter and spamassassin combo, can > I use the spam that spam assassin has collected to train bogofilter, > ie. will the spamassassin header badly effect they way its trained. > Here's a procmail recipe using bogofilter and spamassassin_ (For incoming mail ) ----->8------------->8----------------- :0fw: bogofilter.lock | bogofilter -u -e -p # if bogofilter failed, return the mail to the queue, the MTA will # retry to deliver it later # 75 is the value for EX_TEMPFAIL in /usr/include/sysexits.h :0e { EXITCODE=75 HOST } :0fw: spamassassin.lock * < 256000 | spamc ### # Kill spam first :0: * ^X-Bogosity: Yes, tests=bogofilter .SPAM.bogo/ ## Spamassassin points :0: * ^X-Spam-Status: Yes .SPAM.assassin/ --8<--------8<------------------------------- And here is a cleaning filter, it will remove all SpamAssassin and Bogofilter header tags from the incoming email. ---->8---------------->8---------->8----------- PMDIR=$HOME/.procmail LOGFILE=$PMDIR/clean.log VERBOSE=yes COMSAT=no MAILDIR=$HOME/.maildir :0fw: spamcleanbogo.lock | grep -v X-Bogosity :0fw: spamcleanassassin.lock | spamassassin --remove-markup :0: .SPAM.CLEAN/ --8<--------8<-------------8<------------------ after this, I generally use a set of commands/Scripts as this: sa-learn --dir --spam ~/.maildir/.SPAM.CLEAN This script will parse all the cleaned spam and tell bogofilter.. "its spam darnit" find ~/.maildir/.SPAM.CLEAN/{cur,new}/ -type f |while read FILE; do bogofilter < $FILE || bogofilter -s <$FILE; done Extra step, should always be executed a first time before sorting spam, since it will tell bogofilter what is good: find ~/.maildir/{cur,new}/ -type f |while read HAM; do bogofilter <$HAM && bogofilter -n <$HAM; done And this is good idea to make sure nothing goes bad in your incoming mailbox(make sure you don't have any spam in your inbox first, or you'll throw it off using this, since this piece will tell bogofilter to unlearn it if its spam, and learn it as ham) : find ~/.maildir/{cur,new}/ -type f |while read HAM; do bogofilter <$HAM && bogofilter -Snv <$HAM; done //Spider -- begin .signature This is a .signature virus! Please copy me into your .signature! See Microsoft KB Article Q265230 for more information. end
pgp00000.pgp
Description: PGP signature