Using bogofilter with local Maildirs (and offlineimap)
David Relson
relson at osagesoftware.com
Wed Oct 6 13:15:04 CEST 2004
On Wed, 6 Oct 2004 12:57:42 +0200
Gaizka wrote:
> Hello!
>
> I've been looking for ways to filter my mail using bogofilter, but i
> don't use procmail, and that's the way i think everyone uses it.
>
> My setup is:
> - My ISP gives me IMAP access
> - I synchronize it with my desktop with offlineimap.
> - I then have a local tree of Maildirs in my desktop
>
> I'd like to filter my local tree of Maildirs with bogofilter.
>
> Does anybody have a setup similiar to this one?
> Has anybody written a script to run bogofilter through the Maildirs
> and filter them, or should i write my own?
>
> Thanks for your attention.
Gaizka,
Welcome to bogofilter!
offlineimap is a program I've not heard of before, so I'm unaware of
solutions specifically for it. Does it have a mechanism for running
filters, for example spamassassin? If so, you should be able to run
bogofilter in a similar manner.
Your idea of a script should work and be pretty easy to implement. If
you've got the skills, I can rough one out for you. As hints, I'd use
"find" to get a list of Maildirs, "grep" to ignore ones you don't want
to process, a "for" look to process the files in each Maildir,
bogofilter's return code (0 for spam, 1 for ham), and an "if" to move
spam to a spam folder.
Hope this helps! If it's not enough, let us know :-)
David
More information about the Bogofilter
mailing list