Using bogofilter with local Maildirs (and offlineimap)

Matthias Andree matthias.andree at gmx.de
Thu Oct 7 09:00:03 CEST 2004


Gyepi SAM <gyepi at praxis-sw.com> writes:

> You don't need to write a script for this: there are existing tools to help
> with it.  You need maildircmd and safecat [1], both written by Len
> Budney.

Safecat has a difficult license that makes _assumptions_ on how DJB has
licensed his code that Len Budley took into safecat, when in fact DJB
hasn't issued a license at all; and may be a possible copyright
violation.

Maildircmd, being distributed as a patch against DJB's original
serialmail package, doesn't suffer this problem.

Also note that while Len Budley touts safecat as being really safe, but
has still not implemented a bullet-proof mechanism to generate file
names that are guaranteed to be collision free. It works today, but may
not work on a faster computer or after an OS update on a fast computer.

> Here's how I have solved a similar problem:
>
> 1. Deliver your mail to a temporary Maildir. Let's call it Maildir/spool
> 2. Then run maildircmd on Maildir/spool and feed the results to safecat, which
> delivers the filtered mail to your inbox, say Maildir/inbox.
>
>   maildircmd Maildir/spool "" "bogofilter $bogofilter_options| \
>     safecat Maildir/inbox/tmp Maildir/inbox/new
>
> Ideally, you would want to filter your mail into separate mailboxes.
> That's where procmail or mailfilter come in.

Or maildrop.

-- 
Matthias Andree

Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred)



More information about the Bogofilter mailing list