Running Bogofilter on mailing list stuff prefiltered before Bogofilter is run
David Relson
relson at osagesoftware.com
Tue Sep 11 04:11:56 CEST 2007
On Tue, 11 Sep 2007 00:30:21 +0200
Nigel Henry wrote:
> Sorry for the subject line.
>
> I have Bogofilter setup on Kmail, and it works fine. I have 6 mailing
> lists that are filtered into individual maildir boxes before
> Bogofilter deals with the remaining stuff.
>
> Over the last 2 days a lot of sex spam has been turning up in my
> Debian maildir box. The Debian list is high volume, which is why I'm
> filtering it before Bogofilter runs.
>
> I know this is asking a lot, but is there some way that I can rerun
> Bogofilter again on specific maildir boxes, after it has already
> dealt with the remaining mail that has been downloaded.
>
> Sorry I'm not being too clear here.
>
> I have 6 Kmail filters setup to send mailing list mail to individual
> mailboxes. Bogofilter runs after this mail has been filtered, and
> works just fine on the remaining mail. Spam goes to the trash, ham
> goes to the inbox, and I get a few unsures.
>
> I'm probably asking a bit much, but is it possible to run Bogofilter
> again on the mailboxes that were filtered before Bogofilter ran. I'm
> thinking particularly the Debian mailing list one. It's filtered
> before Bogofilter runs, so I end up with a load of sex spam in it,
> which Bogofilter hasn't been able to get it's hands on.
>
> Any suggestions anyone?
>
> Nigel.
Assuming a directory with one message per file, you could run a script
something like:
bogofilter -T -B $DIRECTORY | while read FN TYPE SCORE ; do
case $TYPE in
H)
mv $FN Ham
;;
S)
mv $FN Spam
;;
U)
mv $FN Unsure
;;
esac
done
HTH,
David
More information about the Bogofilter
mailing list