Gnus development mailing list
 help / color / mirror / Atom feed
From: Jonas Steverud <tvrud@bredband.net>
Subject: Re: Spam splitting and multiple nnimap methods
Date: Tue, 18 May 2004 11:53:01 +0200	[thread overview]
Message-ID: <m21xliukn6.fsf@c-a35372d5.036-4-67626721.cust.bredbandsbolaget.se> (raw)
In-Reply-To: <20040517175042.B23864@gwyn.tux.org> (Timothy Brown's message of "Mon, 17 May 2004 17:50:42 -0400")

Timothy Brown <tim@tux.org> writes:

> Hi,
>
> I'm a little clueless about Gnus, having just started using it and Emacs a few
> months ago.  The manual isn't entirely clear about how best to proceed along
> this path.  Basically:
>
> 	1) I have multiple IMAP select methods.

No problem, I have two POP sources. Spam.el does not care about how
many sources you have.

> 	2) I want to do spam filtering via bogofilter and blackholes, and potentially
> 	   SA later.

(setq spam-use-bogofilter t)
(setq spam-use-blackholes t)
(setq spam-use-spamassassin t)  ;; I have not used this myself, read
          ;;the docs in the infofile for spam.el!


> 	3) I want mail to be "autodetected" and shifted into a spam group.
> 	4) I will also manually train bogofilter by marking messages as spam.

What you do is set up .gnus to load spam.el and tell it which filters
to use, I use bogofilter and use BBDB as a whitelist and have the
following setup:

-----------
(setq gnus-registry-cache-file (concat gnus-dribble-directory
				       "gnus.registry.eld")
      spam-split-group "Spam"
      spam-use-bogofilter t
      spam-use-BBDB t ;; Whitelist
      spam-log-to-registry t
      spam-mark-ham-unread-before-move-from-spam-group t
      spam-move-spam-nonspam-groups-only nil ; No moving at all.
      spam-disable-spam-split-during-ham-respool t
      )

(spam-initialize) ;; Loads the spam.el package etc.
(gnus-registry-initialize)
-----------

To use the registry is a good idea, spam-log-to-registry and
gnus-registry-initialize above, since you then can have
(: gnus-registry-split-fancy-with-parent) in your split rules. That
way emails are split together with their parents, which is good if you
move a discussion to a specific group, e.g. "Grandma's
Birthdayparty". To bad news is that Microsoft Outlook does not add a
References header so those emails are not correctly splitted - but
Outlook Express does add it.

I've added (: spam-split) to my split rules.

Now comes the second part; tell spam.el which groups contains spam and
which don't. That is done with group parameters.

I use topic which makes things a little easier (if you don't, you
might be interested in gnus-parameters which is explained in the Group
Parameters node in the Gnus info file).

On the top Email topic, I have added this:
((comment
  (spam-contents gnus-group-spam-classification-ham))
 (spam-process
  ((spam spam-use-bogofilter)
   (ham spam-use-bogofilter)))
 (spam-process-destination)
 (comment
  (ham-marks
   (gnus-del-mark gnus-read-mark gnus-killed-mark gnus-kill-file-mark gnus-low-score-mark gnus-expirable-mark gnus-ancient-mark))))

It tells Gnus/spam.el to use bogofilter for both spam and ham, that
spam-process-destination shall be nil (i.e. don't move the spam
anywhere, it will be marked as expired and will be deleted with the
rest of the expired emails in that group). The first line tells that
everything is ham (commented out), I used it while training Bogofilter
on ham - together with the last line all read emails where processed
as ham.

On my Spam group (nnfolder:Spam) I have
((expiry-wait . immediate)
 (ham-process-destination respool)
 (spam-contents gnus-group-spam-classification-spam)
 (ham-marks
  (gnus-ticked-mark)))

Which deletes all emails at once, that all ticked articles (!) shall
be considered ham and respooled, i.e. sent through the split process
again, and that this group consists of spam.



All spam I find in ham groups (i.e. everywhere except Spam) I mark
with M-d and it is sent to Bogofilter on exit and then marked as
expired.

All spam found during splitting is sent to Spam and when I enter it,
all emails are marked with $ as spam and those I mark as ham (with !)
is sent to bogofilter as ham and then sent to respool. The remaining
emails are sent to bogofilter to be trained as spam, and then deleted
due to the "immediate" value of expire-wait.

The difference between this and your setup is that I do not have any
autodetection in any group since I don't have access to News and all
may emails is filtered through (: spam-split).

HTH.

/Jonas
-- 
(        http://hem.bredband.net/steverud/        !     Wei Wu Wei     )
(        Meaning of U2 Lyrics, Roleplaying        !  To Do Without Do  )




  reply	other threads:[~2004-05-18  9:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-17 21:50 Timothy Brown
2004-05-18  9:53 ` Jonas Steverud [this message]
2004-05-18 12:53   ` Timothy Brown
2004-05-18 13:50     ` Jonas Steverud
2004-05-18 14:02     ` IMAP Splitting with multiple mailboxes (was Re: Spam splitting and multiple nnimap methods) Timothy Brown
2004-05-18 14:13       ` IMAP Splitting with multiple mailboxes Kai Grossjohann
2004-05-18 14:15         ` Timothy Brown
2004-05-18 15:53           ` Kai Grossjohann
2004-05-18 15:58             ` Timothy Brown
2004-05-18 16:14               ` Kai Grossjohann
2004-05-18 14:13     ` Spam splitting and multiple nnimap methods Jonas Steverud
2004-05-18 19:11     ` Ted Zlatanov
2004-05-18 22:19       ` Timothy Brown
2004-05-19 11:36         ` Jonas Steverud
2004-05-19 14:50           ` Ted Zlatanov
2004-05-19 14:48         ` Ted Zlatanov
2004-05-20 10:27       ` Yair Friedman
2004-05-20 18:49         ` Ted Zlatanov
2004-05-22 23:45           ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m21xliukn6.fsf@c-a35372d5.036-4-67626721.cust.bredbandsbolaget.se \
    --to=tvrud@bredband.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).