help-gnustep
[Top][All Lists]
Advanced

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

Re: GNUMail.app and bogofilter


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

Adam Fedor <fedor@doc.com> 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
> GNUMail.app 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--
|/usr/local/bin/procmail
--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

:0fw
| 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

:0e
{ EXITCODE=75 HOST }

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

:0:
* ^X-Bogosity: Spam, tests=bogofilter
/home/rbc/Mailboxes/bogofilter-spam

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

:0:
* ^X-Bogosity: Unsure, tests=bogofilter
/home/rbc/Mailboxes/bogofilter-unsure

# 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 http://www.brad-x.com/unix/spamfilter.phtml:

--cut here--
*/30 * * * * /usr/local/bin/bogofilter -Ns < ~/Mailboxes/bogofilter-train-spam
*/30 * * * * /usr/local/bin/bogofilter -Sn < 
~/Mailboxes/bogofilter-train-notspam
--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
db.

I hope this helps someone else.  

Best regards,

                        --Bruce




reply via email to

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