Bogofilter training on KMail mailboxes?

Todd Slater dontodd at gmail.com
Mon Jan 16 01:32:35 UTC 2006


On 1/15/06, Rob Blomquist <rob at robandmegan.net> wrote:
> I am attempting to use bogofilter after a couple of years of running
> SpamAssassin.
>
> Under SA, it was easy to teach it about spam: every night I ran a cron job on
> my spamfolder, which has "maildir" style directories.
>
> according to what I have read on the bogofilter page, all I need to do is run
> "bogofilter -s ~/.Mail/SpamPile/cur/, and the filtering will be done.
>
> Last night, while in ~/.Mail/SpamPile/cur/ I tried to run bogofilter -s, and
> it hung all night.
>
> Today I tried while in ~ to run "bogofilter -s .Mail/SpamPile/cur/" and I got
> "Extra arguments given, first: .Mail/SpamPile/cur/. Aborting."
>
> It appears to want a command format I don't understand. Thoughts?

It looks like you're using maildir format; you have to pass files to
bogofilter, like an mbox (all mails in one big file) or the individual
files in an mh or maildir. So, you need to train using

for i in *
do
bogofilter -s < "$i"
done

That trains bogofilter on your spam corpus, then do the same for your
ham (with -n). I'm not sure how you set up kmail to call bogofilter to
process incoming mails but I'm sure there are examples in the docs.

HTH,
Todd




More information about the ubuntu-users mailing list