From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57456 Path: main.gmane.org!not-for-mail From: Jonas Steverud Newsgroups: gmane.emacs.gnus.general Subject: Re: Spam splitting and multiple nnimap methods Date: Tue, 18 May 2004 11:53:01 +0200 Organization: The Deciples of Albericht Nibelungen Sender: ding-owner@lists.math.uh.edu Message-ID: References: <20040517175042.B23864@gwyn.tux.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084874008 710 80.91.224.253 (18 May 2004 09:53:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 May 2004 09:53:28 +0000 (UTC) Original-X-From: ding-owner+M5996@lists.math.uh.edu Tue May 18 11:53:19 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQ1Hi-0006VJ-00 for ; Tue, 18 May 2004 11:53:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BQ1HU-0000M2-00; Tue, 18 May 2004 04:53:04 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BQ1HQ-0000Lx-00 for ding@lists.math.uh.edu; Tue, 18 May 2004 04:53:00 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BQ1HP-0003GD-RW for ding@lists.math.uh.edu; Tue, 18 May 2004 04:52:59 -0500 Original-Received: from mxfep02.bredband.com (mxfep02.bredband.com [195.54.107.73]) by justine.libertine.org (Postfix) with ESMTP id D0A903A004E for ; Tue, 18 May 2004 04:52:58 -0500 (CDT) Original-Received: from c-a35372d5.036-4-67626721.cust.bredbandsbolaget.se.bredband.net ([213.114.83.172] [213.114.83.172]) by mxfep02.bredband.com with ESMTP id <20040518095258.EIRI14728.mxfep02.bredband.com@c-a35372d5.036-4-67626721.cust.bredbandsbolaget.se.bredband.net> for ; Tue, 18 May 2004 11:52:58 +0200 Original-To: ding@gnus.org Mail-Copies-To: never In-Reply-To: <20040517175042.B23864@gwyn.tux.org> (Timothy Brown's message of "Mon, 17 May 2004 17:50:42 -0400") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (darwin) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57456 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57456 Timothy Brown 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 )