# trains bayesian filters SPAMDIR="/home/klink/.Maildir/.Poubelle.Spam/cur/ /home/klink/.Maildir/.Poubelle.Spam/new/" # spamd: can handle by itself bogofiltered headers 25 * * * * Debian-exim /usr/bin/sa-learn --spam $SPAMDIR # bogofilter: not able to clean inappropriate cues from spamd, will do it # by removing: # - informational SpamAssassin headers # - SpamAssassin score and decision (irrelevant) # (-u was not set as it is discouraged perf-wise in bogofilter's manual) 28 * * * * Debian-exim for file in `find $SPAMDIR -type f`; do cat $file; done | grep -v -E "^X-Spam-(Checker|Flag|Level|Report)" | sed s/"^X-Spam-Status.*score.*required.*tests="//g | /usr/bin/bogofilter --register-spam