Re: Bogofilter on an imap server

Anne Wilson <[email protected]>
Newsgroups gmane.mail.bogofilter.general
Message-ID <[email protected]>
On Friday 31 Aug 2007, Matthias Andree wrote:
> On Thu, 30 Aug 2007, Anne Wilson wrote:
> > I've been running bogofilter for some time with kmail.  Now, however, all
> > mail is coming from an imap server (dovecot+procmail), so I'd like to be
> > able to run it at server level.
> >
> > Each user has his own bogofilter database.  Is it sufficient to put
> >
> >       :0
> >
> >       * ? /usr/bin/bogofilter
> >       spam/.
> >
> > at the beginning of each .procmailrc?  That's what is recommended in the
> > document I found on-line, but I'm not sure I understand it.  What tells
> > it where to file the spam?  Do I set a destination line in the usual way?
>
> Don't use it.  It neglects to filter the body through bogofilter,
> doesn't do unsure treatment or error recovery.
>
> Where did you find it? Please tell the author of the site to correct it
> or take it down, and please Cc: me; if it's somewhere in the official
> bogofilter pages (www.bogofilter.org or bogofilter.sourceforge.net),
> just follow up on this post and we'll correct it.
>
> WRT delivery, check the procmailrc(5) man page, the trailing /. is
> special to procmail.

I now have bogofilter handling mail on my imap server.  It references the 
database already built in the user's home directory.  Here is what I needed 
to add to .procmailrc:

:0fw
| bogofilter -e -p

:0e
{ EXITCODE=75 HOST }

:0:
* ^X-Bogosity: Spam, tests=bogofilter
${MAILDIR}.INBOX.a-Spam/

:0e
{ EXITCODE=75 HOST }

:0:
* ^X-Bogosity: Unsure, tests=bogofilter
${MAILDIR}.INBOX.a-Unsure/

:0e
{ EXITCODE=75 HOST }

The ':0e' stanzas create a neat escape on error.  These recipes are for use on 
a maildir format server.  If used with mbox mail the trailing '/' should be 
removed from each destination line.

Although this hasn't been the heaviest day for spam, I can confirm that both 
spam and unsure messages are being processed correctly.

Hope that helps others.

Anne

_______________________________________________
Bogofilter mailing list
[email protected]
http://www.bogofilter.org/mailman/listinfo/bogofilter
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBG2HzEj93fyh4cnBcRAo5PAJ9hsTuQO0N94MP2GBFMqtOUYaisJwCfc4Lo
95wYUntqXGgeYJBrai4YzuU=
=HVnp
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.