From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64903 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: Spam Package help Date: Fri, 06 Jul 2007 12:53:11 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: <85veems993.fsf@qustom.co.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183740907 20820 80.91.229.12 (6 Jul 2007 16:55:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2007 16:55:07 +0000 (UTC) Cc: Peter Russell , Ding Mailing List Original-X-From: ding-owner+M13413@lists.math.uh.edu Fri Jul 06 18:55:05 2007 connect(): Connection refused Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6r59-000075-OS for ding-account@gmane.org; Fri, 06 Jul 2007 18:55:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1I6r4N-00012d-DE; Fri, 06 Jul 2007 11:54:11 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1I6r4L-00012L-HP for ding@lists.math.uh.edu; Fri, 06 Jul 2007 11:54:09 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1I6r4H-0003P9-1X for ding@lists.math.uh.edu; Fri, 06 Jul 2007 11:54:09 -0500 Original-Received: from blockstar.com ([170.224.69.95] helo=mail.blockstar.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1I6r4C-0002QT-00 for ; Fri, 06 Jul 2007 18:54:00 +0200 Original-Received: from tzz (unknown [69.25.70.4]) by mail.blockstar.com (Postfix) with ESMTP id 971D83E81A2; Fri, 6 Jul 2007 09:56:10 -0700 (PDT) Original-Newsgroups: gnu.emacs.gnus 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" User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.96 (darwin) Cancel-Lock: sha1:Od85PW1goDA+qQLaAHDktG7f7Dw= Mail-Followup-To: Peter Russell , Ding Mailing List In-Reply-To: <85veems993.fsf@qustom.co.uk> (Peter Russell's message of "Mon, 21 May 2007 11:31:56 GMT") Posted-To: gnu.emacs.gnus X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64903 Archived-At: The following message is a courtesy copy of an article that has been posted to gnu.emacs.gnus as well. On Mon, 21 May 2007 11:31:56 GMT Peter Russell wrote: PR> There are two things I'd like to achieve: PR> 1. Since these addresses have different profiles, I'd like to use PR> different bogofilter databases for them. However as far as I can PR> see there is only one global setting for the database file. Is PR> this possible - if it isn't now, it worth adding? Hi Peter, sorry for the late reply. I cc-ed your e-mail address to make sure you'd get it. You can put any Lisp code in the (: ) rule, so you could redefine spam-bogofilter-database-directory temporarily. Something like this (let ((spam-bogofilter-database-directory "hello")) (message spam-bogofilter-database-directory)) (message spam-bogofilter-database-directory) Use C-x C-e after the last parenthesis of these two expressions. The first one temporarily sets spam-bogofilter-database-directory to "hello". So, we can do a rule like this: (: let ((spam-bogofilter-database-directory "your favorite setting")) (spam-split "INBOX.Support Requests.spam")) This is untested, but it should work (I am CC-ing the Gnus developer list in case someone has a better suggestion). You could always write your own function that wraps spam-split, if you don't like the solution above. PR> 2. Since I need to check support request spam (for example) more often PR> and more carefully than main INBOX spam, I want to set up some PR> specific spam folders, which are linked to their parent folders. I PR> have this almost working. PR> For number 2, the tree and rules should be something like this: PR> INBOX <- All mail is delivered here PR> INBOX.spam <- The default place to drop spam. PR> Checked infrequently PR> INBOX.Support Requests <- some mail is split here PR> INBOX.Support Requests.spam <- Spam to the support requests addr. goes PR> here. Checked often. PR> INBOX.Lists... <- Spam that would otherwise be split to PR> other folders should go to INBOX.spam PR> (I hope the formatting of that comes out OK, message mode seems to PR> handle indenting text very nicely :-) ) PR> What I currently have in my gnus.el is this: PR> ;; We want spam checking! PR> (spam-initialize) PR> (setq spam-use-bbdb t PR> spam-use-regex-headers t PR> spam-use-bogofilter t) PR> ;; This doesn't work! What I hoped it would do is to say "If a folder PR> ;; doesn't end in .spam then it's a ham folder, and any spam in it PR> ;; should be moved to the same folder name, but with .spam appended. PR> ;; If it does end in .spam, it's a spam folder, and any ham should be PR> ;; moved to the folder with the same name, but without the .spam. Not PR> ;; exactly what I describe above, but close enough. As it is, I don't PR> ;; believe it's doing anything at all. I have no idea how to debug PR> ;; this. PR> (setq gnus-parameters PR> '(("^\\(nnimap\\+mail.qustom.co.uk:INBOX.*\\)$" PR> (spam-contents . gnus-group-spam-classification-ham) PR> (spam-process-destination . "\\1.spam") PR> '(("^\\(nnimap\\+mail.qustom.co.uk:INBOX.*\\)\\.spam$" PR> (spam-contents . gnus-group-spam-classification-spam) PR> (ham-process-destination . "\\1") You can debug the rules with (gnus-parameter-spam-contents "GROUP"). For instance, your rules would probably return 'gnus-group-spam-classification-spam for this call: (gnus-parameter-spam-contents "nnimap+mail.qustom.co.uk:INBOX.*.spam") I personally find it easier to a) make a group a spam group when the name contains the string "spam", and b) use topics and topic/group parameters to set parameters as needed. Your way should work, but it seems harder to me :) Ted