From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54621 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.gnus.general Subject: How to use the spam.el package? Date: Sat, 01 Nov 2003 20:17:15 +0000 Sender: ding-owner@lists.math.uh.edu Message-ID: <87brrv269g.fsf@emptyhost.emptydomain.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067717922 12709 80.91.224.253 (1 Nov 2003 20:18:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 1 Nov 2003 20:18:42 +0000 (UTC) Original-X-From: ding-owner+M3162@lists.math.uh.edu Sat Nov 01 21:18:40 2003 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 1AG2Cm-0004dk-00 for ; Sat, 01 Nov 2003 21:18:40 +0100 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 1AG2Bm-0005xX-00; Sat, 01 Nov 2003 14:17:38 -0600 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AG2Bd-0005xP-00 for ding@lists.math.uh.edu; Sat, 01 Nov 2003 14:17:29 -0600 Original-Received: from quimby.gnus.org (quimby.gnus.org [80.91.224.244]) by justine.libertine.org (Postfix) with ESMTP id B9C913A004C for ; Sat, 1 Nov 2003 14:17:28 -0600 (CST) Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1AG2Bc-0005ui-00 for ; Sat, 01 Nov 2003 21:17:28 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 97 Original-NNTP-Posting-Host: 213-203-244-156.kunde.vdserver.de Original-X-Trace: quimby.gnus.org 1067717848 22735 213.203.244.156 (1 Nov 2003 20:17:28 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Sat, 1 Nov 2003 20:17:28 +0000 (UTC) User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:K6fZhttO8SW7QUx6xAaghExrAAc= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54621 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54621 I tried several times to configure spam.el for my use. Finally, I came up with the outside-Gnus setup that I want to use, and so I gave spam.el another go. I'm sending this here to ask whether my configuration looks sane and to report some findings where the documentation was confusing. My configuration looks like this: ;; Spam (setq spam-use-bogofilter-headers t) (setq spam-split-group "INBOX.spam") (setq spam-junk-mailgroups (list "nnimap:INBOX.spam" "nnimap:INBOX.makespam")) (setq gnus-spam-process-newsgroups '(("^nnimap:INBOX" nil))) (setq gnus-spam-process-destinations '(("^nnimap:INBOX" "nnimap:INBOX.makespam"))) (spam-initialize) ;; and then: (setq nnimap-split-fancy '(| (: spam-split) ... "INBOX.misc")) I'm reading mail from a Cyrus server with the following setup: Incoming messages are passed through bogofilter before Cyrus sees them. There is a cron job which goes through all INBOX.makespam and INBOX.makeham folders for all users and classifies messages found there as spam or ham respectively. So what I want is this: Incoming spam should be split into nnimap:INBOX.spam. Hitting M-d on a message should send it to the nnimap:INBOX.makespam group, where it will be picked up by the Cron job later. Also, marking something as ham in a spam group should result in that message being moved to nnimap:INBOX, I guess. (There, nnimap-split-fancy will find it again, and then hopefully won't consider it spam again.) Things I found: * The docs say "First of all, you *must* run the function `spam-initialize' to autoload `spam.el' and to install the `spam.el' hooks". In fact, however, it seems that spam-initialize should come /last/, not first: its behavior depends on the other variables being set. I like obscure jokes just as well as the next person, but maybe a hint for the uninitiated would be nice? * I /think/ that spam-split-group should be a naked group name whereas all the other variables should be fully qualified group names. It isn't made clear in the documentation. * The format of gnus-spam-process-newsgroups and gnus-spam-process-destinations isn't made clear, neither in info nor in C-h v. I suggest to say something like "this should be a list of newsgroup specifications. Each newsgroup specification has the format (REGEXP PROCESSOR)". I found out what to do by running M-x customize-variable RET and then looking at the resulting Lisp expression, but why not make it explicit? * I wasn't sure that just setting the processor to nil was the right thing to do, I was just operating on a hunch that it might work. How about making this explicit, too? * I would also appreciate some tutorial kind of advice, like saying for the following common situation, this is how you set the variables. It's difficult to figure out how it all ties together: you have to read all of the main node on spam.el and /understand/ it, too, if you want to configure things. I guess there are numerous mistakes in my config, but for the time being it works, and the smoke coming from my head is making the room foggy. * How do I tell spam.el that messages from nnimap:INBOX.spam and nnimap:INBOX.makespam don't need to be frobbed further? I'm afraid they'll be subjected to gnus-spam-process-destinations... * I completely ignored the group parameters thing, even though it seemed the easiest way to configure stuff. The reason for doing so was that I didn't fancy setting the same spam process destination on all my groups. (I just switched to a new server and haven't switched on topics mode, yet.) I hope that the above stupid questions are useful for something. I'd like to promise to help improving the documentation, but what with real life and a job, my time has been more limited than some months ago. Now let me go talk to the Bogofilter folks about setting up the server-side splitting thing. Kai