From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/9294 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.user 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 1183759988 20714 80.91.229.12 (6 Jul 2007 22:13:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2007 22:13:08 +0000 (UTC) Cc: Peter Russell , Ding Mailing List To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Sat Jul 07 00:13:06 2007 connect(): Connection refused Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6w2x-00034K-OV for gegu-info-gnus-english@m.gmane.org; Sat, 07 Jul 2007 00:13:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6w2x-0002LI-7C for gegu-info-gnus-english@m.gmane.org; Fri, 06 Jul 2007 18:13:03 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsserver.news.garr.it!kanaga.switch.ch!switch.ch!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 91 Original-X-Trace: news.albasani.net lxPwrXZy6d2lZ8yriWZqkuceGIAzDd8wEk0FCc3aJMh7Y/OJUBXZwXnPtMhC9idB5u+vdnaswse/OlAEEAuUoVBtGcpGmx38+I0RsTumP0RIcLqUrG8E7KZ93Vvo+odn Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Fri, 6 Jul 2007 16:53:23 +0000 (UTC) X-User-ID: njGWwAymwmWYfiGEs/Xp+QhDhvGB6D9TOBlbR3HqAhQ= 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" Cancel-Lock: sha1:Od85PW1goDA+qQLaAHDktG7f7Dw= sha1:ekILEa+k3RO8QiRoDjHUF8zSrBA= User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.96 (darwin) X-NNTP-Posting-Host: lgbPDImll6Y7e4Dn+ZnArOFLm1askL/Tyg7zKDV+lJU= Original-Xref: shelby.stanford.edu gnu.emacs.gnus:79479 X-Mailman-Approved-At: Fri, 06 Jul 2007 18:12:52 -0400 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:9294 Archived-At: 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