[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: and bogofilter

From: Robert Bruce Carleton
Subject: Re: and bogofilter
Date: 28 Feb 2006 21:30:21 -1000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Adam Fedor <> writes:

> On Nov 29, 2005, at 2:30 AM, Robert Bruce Carleton wrote:
> I'm having trouble with a bogofilter filter with GNUMail.  I'm running
> 1.1.2 and bogofilter 0.95.2.  It seems like bogofilter is
> running and updating the wordlist when mail comes in.  I have "Expert"
> set to look for "Yes" in the X-Bogosity filter.  It doesn't seem to be
> moving the email to my spam folder.  I do have the action set to
> "Transfer to mailbox".  I'm pretty happy with how well bogofilter is
> trained, I've been using it sucessfully with kmail.  Any suggestions?
> IMAP or POP? IMAP most certainly does not work with external filters.
> I haven't tried POP.  Perhaps you should also ask on the GNUmail
> mailing lists.

I never did figure out how to get the configuration right in GNUMail
to get bogofilter to work internally.  I've set up procmail with
bogofilter to pre-process my email before GNUMail reads it.  This has
the advantage of working with most email clients even if they don't
support some kind of filtering internally.  Here is my .forward:

--cut here--
--cut here--

Here is my .procmailrc from the bogofilter man page:

--cut here--
# filter mail through bogofilter, tagging it as Ham, Spam, or Unsure,
# and updating the wordlist

| bogofilter -u -e -p

# if bogofilter failed, return the mail to the queue;
# the MTA will retry to deliver it later
# 75 is the value for EX_TEMPFAIL in /usr/include/sysexits.h


# file the mail to spam-bogofilter if it's spam.

* ^X-Bogosity: Spam, tests=bogofilter

# file the mail to unsure-bogofilter
# if it's neither ham nor spam.

* ^X-Bogosity: Unsure, tests=bogofilter

# With this recipe, you can train bogofilter starting with an empty
# wordlist.  Be sure to check your unsure-folder regularly, take the
# messages out of it, classify them as ham (or spam), and use them to
# train bogofilter.
--cut here--

Here is my crontab borrowed from

--cut here--
*/30 * * * * /usr/local/bin/bogofilter -Ns < ~/Mailboxes/bogofilter-train-spam
*/30 * * * * /usr/local/bin/bogofilter -Sn < 
--cut here--

I started with a fairly well trained bogofilter.  

The idea is that you move mail classified incorrectly by bogofilter
into the bogofilter-train-spam and bogofilter-train-notspam folders.
Crontab runs bogofilter every half hour to add the correction to the

I hope this helps someone else.  

Best regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]