Home IMAP server

Todd Slater dontodd at gmail.com
Thu Dec 28 14:54:44 UTC 2006


Hi,

On 12/27/06, Dotan Cohen <dotancohen at gmail.com> wrote:
<snip>
> 5) If I continue using bogofilter in Kmail, it will only filter the
> mail on that machine. Or, is there a way to have bogofilter in the
> IMAP server itself? That way it will learn from when I tag ham/spam on
> both machines.

Yes, you'd want bogofilter to run on the same machine as your IMAP
server so that no matter what machine you access your mail from, mail
gets passed through bogofilter. I've got a server set up like this,
and the process is that postfix receives the mail and hands it off to
procmail, which sends it through bogofilter and then delivers it to
the local mailboxes. All training can be done via the mail client, by
dragging and dropping messages to the appropriate folder.

I set up bogofilter and folders like this:

a .Junk folder, where mail identified as spam goes.

a .MakeJunk folder, where misclassified ham goes (bogofilter thinks
it's ham but it's really spam)

a .MakeGood folder, where misclassified spam goes (bogofilter thinks
it's spam but it's really ham)

Since bogofilter uses tristate classification now, I have approached
the unsure messages in one of two ways, either

1. having bogofilter put ???UNSURE??? in the subject line so I'll know
it's unsure, or

2. creating an .Unsure folder where procmail can put those messages.

I then run scripts via cron on the server that process mail in
.MakeJunk, .MakeGood, and .Unsure. These basically run every couple of
hours and run the mails through bogofilter with the appropriate
switches for training. I only keep one week worth of spam in my Junk
folder, anything older than 7 days gets moved out of my maildir and to
another folder outside of my mail root. I tar.gz that directory every
week or so to save space.

Since the vast majority of my unsures are actually spam, I have a
script that automatically classifies those mails older than 7 days as
junk and move them to my spam archive.

Let me know if you need details on my server setup, it's on Ubuntu, too.

Todd




More information about the ubuntu-users mailing list