From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60230 Path: news.gmane.org!not-for-mail From: "Ted Zlatanov" Newsgroups: gmane.emacs.gnus.general Subject: Re: bogofilter setup examples Date: 29 Apr 2005 11:26:49 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <4n8y31li2u.fsf@lifelogs.com> References: <873btmif91.fsf@mun.ca> <4nwtqubt1b.fsf@lifelogs.com> <878y34koop.fsf@mun.ca> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114788277 15589 80.91.229.2 (29 Apr 2005 15:24:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2005 15:24:37 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M8758@lists.math.uh.edu Fri Apr 29 17:24:32 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DRXJv-0001gB-6O for ding-account@gmane.org; Fri, 29 Apr 2005 17:22:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DRXOc-0006t9-00; Fri, 29 Apr 2005 10:27:14 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DRXOT-0006t3-00 for ding@lists.math.uh.edu; Fri, 29 Apr 2005 10:27:05 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DRXON-0004jm-Gx for ding@lists.math.uh.edu; Fri, 29 Apr 2005 10:26:59 -0500 Original-Received: from clifford.bwh.harvard.edu ([134.174.9.41] helo=mail.bwh.harvard.edu) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DRXOM-0007Ge-00 for ; Fri, 29 Apr 2005 17:26:58 +0200 Original-Received: (qmail 23569 invoked from network); 29 Apr 2005 15:24:02 -0000 Envelope-Sender: tzz@lifelogs.com Envelope-Recipients: sluque@mun.ca, ding@gnus.org, Original-Received: from asimov.bwh.harvard.edu (HELO asimov) (internal?.8?user:?tzz@[134.174.8.118]) (envelope-sender ) by mail.bwh.harvard.edu (qmail-ldap-1.03) with SMTP for ; 29 Apr 2005 15:24:00 -0000 Mail-Followup-To: "Sebastian Luque" , ding@gnus.org Original-To: "Sebastian Luque" X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" X-Hashcash: 1:20:050429:sluque@mun.ca::RLZFFzWiRf6NQn8R:00000mah X-Hashcash: 1:20:050429:ding@gnus.org::rA8OJLLl/3RPwWPL:00003vPG In-Reply-To: <878y34koop.fsf@mun.ca> (Sebastian Luque's message of "Wed, 27 Apr 2005 14:24:54 -0500") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on sysblade0.bwh.harvard.edu X-Spam-Status: No, score=-1.6 required=5.8 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60230 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:60230 On Wed, 27 Apr 2005, sluque@mun.ca wrote: > Thanks Jonas and Ted for your advise, I did make some progress by putting > the following in my ~/.gnus.el: > > (require 'spam) > > (setq spam-split-group "Spam" spam-use-bogofilter t nnmail-split-methods > 'nnmail-split-fancy nnmail-split-fancy '(| (: spam-split) ("from" > "someregexp" "somegroup") (any > ".*video4linux.*\\|.*Sympa\\|.*helixcommunity.*\\|.*aircanada.com.*\\|.*ostg.*" > "Various") ("to" ".*ecolog-l.*" "Ecolog-L") ("to" ".*marmam.*" > "Marmam") ("to" ".*mammal-l.*" "Mammal-L") ("from" > ".*nature\\.com\\|.*source\\.cisti@.*\\|.*blackwell\\.synergy.*\\|.*CSIRO.*\\|.*@elsevier.*\\|.*oupjournals.*\\|.*cambridge\\.org\||.*cobjnls.*\\|.*springerlink.de" > "Literature") "mail.misc")) > > (spam-initialize) > > > For some unknown (to me) reason, using Ted's suggestion: > > (require 'spam) > (spam-initialize 'spam-use-bogofilter) > ... > > returned a "wrong number of arguments..." error for spam-initialize as > gnus was starting up. You are using an older version of Gnus - I would use CVS if possible, 5.10.8 otherwise. spam.el has changed a bit since 5.10.7, including some bug fixes. If you don't want to upgrade, things will work but it will be harder for me to figure out what went wrong if there's a problem. > Anyway, the setup above seems to be working somewhat fine for me. I > don't understand, however, where (: spamp-split) needs to go in the > nnmail-split-fancy list. I guess putting it at the beginning as I > did splits the spam into my Spam group before doing the rest of my > splitting rules, but perhaps it's better to put it right before > "mail.misc". This is why I allow for a symbol parameter to spam-split. You can say, for example: (: spam-split 'spam-use-blacklist) at the beginning, which will catch only known spammers, and then (: spam-split 'spam-use-bogofilter) towards the end to catch more generic spam. You can even give a group name as a parameter, instead of the default ("spam" usually). If you just use the default (: spam-split), I'd put it towards the end. > Another thing I had to do, although I would have > preferred to put my own expressions in my ~/.gnus.el, was to 'G c' > on the "mail.misc" group and set: > > - Group contents spam/ham classification: > gnus-group-spam-classification-ham > > - Spam summary exit processor: > Spam: Bogofilter > Ham: Bogofilter > > - Destination for spam-processed articles at summary exit: > nnmaildir:Spam > > - Spam-mark choices: > gnus-spam-mark > > My intention was to declare "mail.misc" as containing ham, but that whenever > I mark a message as spam ('S x'), it will be put in "Spam" and recorded by > bogofilter for the future. Is "nnmaildir:Spam" correct? I would use the full group name as it appears in the Group buffer. The rest is OK. > Now, on the "Spam" group I did 'G c' and: > > - Group contents spam/ham classification: > gnus-group-spam-classification-spam > > - Spam summary exit processor: > Ham: Bogofilter > > - Destination for spam-processed articles at summary exit: > nnmaildir:mail.misc > > - Spam-mark choices: > gnus-spam-mark > > and my intention here was to be able to mark as ham any ham that may have > been missclassified, send it to "mail.misc", and record it by bogofilter > for the future. You want to set the ham-process-destination to "nnmaildir:mail.misc" while leaving the spam-process-destination nil (so the spam will be deleted in place). You need to add the Spam: Bogofilter exit processor as well, or spam messages will not be processed. Right now you're just teaching what's ham. > It seems to work fine, but some messages (particularly from ecolog-l) are > sent to "Spam". Marking them as ham does send them back "mail.misc" > (where I later redirect them by hand to "Ecolog-L"), but they don't seem > to be recorded by bogofilter, as (some) future messages from this address > still get put in "Spam". If you could update to CVS, that would make the job much easier. Let me know when you decide, and we'll go from there. Ted