From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/49039 Path: main.gmane.org!not-for-mail From: Niklas Morberg Newsgroups: gmane.emacs.gnus.general Subject: Re: Getting started with spam filtering Date: Fri, 10 Jan 2003 13:51:00 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: <84u1gkfa84.fsf@lucy.cs.uni-dortmund.de> <4n65szll2k.fsf@lockgroove.bwh.harvard.edu> <87fzs3p628.fsf@emacswiki.org> <87r8bmjhhl.fsf@emacswiki.org> <87u1ghi4ot.fsf@emacswiki.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1042203076 26114 80.91.224.249 (10 Jan 2003 12:51:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 10 Jan 2003 12:51:16 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Wyd0-0006n4-00 for ; Fri, 10 Jan 2003 13:51:15 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18Wydm-0007e1-00; Fri, 10 Jan 2003 06:52:03 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 10 Jan 2003 06:52:56 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id GAA21834 for ; Fri, 10 Jan 2003 06:52:43 -0600 (CST) Original-Received: (qmail 41177 invoked by alias); 10 Jan 2003 12:51:45 -0000 Original-Received: (qmail 41172 invoked from network); 10 Jan 2003 12:51:45 -0000 Original-Received: from unknown (HELO krynn.axis.se) (212.209.10.216) by 66.230.238.6 with SMTP; 10 Jan 2003 12:51:45 -0000 Original-Received: from PCNIKLAS2 (dh10-13-8-244.axis.se [10.13.8.244]) by krynn.axis.se (8.12.3/8.12.3/Debian -4) with ESMTP id h0ACp0FU000449 for ; Fri, 10 Jan 2003 13:51:00 +0100 Original-To: ding@gnus.org In-Reply-To: <87u1ghi4ot.fsf@emacswiki.org> (Alex Schroeder's message of "Fri, 10 Jan 2003 13:12:50 +0100") User-Agent: Gnus/5.090011 (Oort Gnus v0.11) Emacs/21.2 (i386-mingw-nt5.0.2195) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:49039 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:49039 --=-=-= Alex Schroeder writes: > So -- if *you* have a working setup, I would be very happy > if you could explain it to me, and then I will add it to > the manual. ;) Actually, it was quite simple to set up with the new changes made to spam.el. See attached file for notes I took while setting it up. > At the moment, it seems that I can just write that the > same applies for IMAP, just use nnmail-split-fancy and > nnimap-split-fancy instead? That would be just fine. > I did not understand the cache part, however. Does the > above work *only* with cached articles, or does the above > without caching just limit itself to the headers (which > might also work, of course, or it might not be enough, > that remains to be seen). I do the training on the cached articles and since I use fancy splitting, I guess gnus uses all of the article when splitting. Doing the training without having the articles available locally (via the agent or the cache) seems tricky. >> 1. Copy this text to the *scratch* buffer >> 2. edit the strings to reflect your settings >> 3. go to the end of each statement and press C-x C-e to >> evaluate the function > > Hm. Are there other parts of the Gnus manual at this level of detail? Probably not, no. Maybe it's best to leave it as is. Btw, it would be nice to be able to check the spam-stat score of an article. Just as `S t' is bound to `(spam-bogofilter-score)' I think it should be possible to run `(spam-stat-score-buffer)' or something similar with a key combination. Maybe `S t' could be used for that too since you are unlikely to run multiple spam processors? Niklas --=-=-= Content-Disposition: attachment; filename=getting_started_spam.txt Using spam.el and spam-stat.el with an nnimap backend. I previously had a group called "spam", which is the default spam group for spam.el. Otherwise I guess you need to create this. All my mails start in INBOX, I then split mails with nnimap-split-fancy to email list groups and to the "spam" group based on a corporate spam filter. The emails that are left are put in "incoming". I did the following changes in .emacs: (load "spam") in gnus.el add this rule to nnimap-split-fancy: (: spam-split) Customize: '(spam-use-stat t) '(gnus-spam-process-destinations (quote (("incoming" "spam")))) Train spam-stat: Start from scratch: (spam-stat-reset) Reset:(setq spam-stat (make-hash-table :test 'equal)) Learn spam: (spam-stat-process-spam-directory "~/News/agent/nnimap/mailse01.axis.se/spam") Learn non-spam: (spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/incoming") (spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/INBOX_Archive") (spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/INBOX_Personal") (spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/lists_ding") Reduce table size: (spam-stat-reduce-size) Save table: (spam-stat-save) Then I customized group parameters for the "incoming" group containing ham mails as such: (spam-contents gnus-group-spam-classification-ham) (spam-process (gnus-group-ham-exit-processor-stat)) and for the spam group: (spam-contents gnus-group-spam-classification-spam) (spam-process (gnus-group-spam-exit-processor-stat)) (ham-process-destination . "incoming") and that's it. When spam end up in ham groups I just press M-d and the stats are updated when exiting the group. --=-=-=--