From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57744 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: spam.el reporting and moving ham out of spam groups. Date: Thu, 27 May 2004 16:15:21 +1000 Sender: ding-owner@lists.math.uh.edu Message-ID: <877juypf9i.fsf@enki.rimspace.net> References: <8765akfxxt.fsf@enki.rimspace.net> <4nekp7jhc9.fsf@lifelogs.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1085641323 27725 80.91.224.253 (27 May 2004 07:02:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 May 2004 07:02:03 +0000 (UTC) Original-X-From: ding-owner+M6285@lists.math.uh.edu Thu May 27 09:01:53 2004 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 1BTEtl-0003qM-00 for ; Thu, 27 May 2004 09:01:53 +0200 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 1BTEtJ-0001p9-00; Thu, 27 May 2004 02:01:25 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BTEtA-0001p1-00 for ding@lists.math.uh.edu; Thu, 27 May 2004 02:01:16 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BTEt9-00060l-BP for ding@lists.math.uh.edu; Thu, 27 May 2004 02:01:15 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id 905FD3A003C for ; Thu, 27 May 2004 02:01:13 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BTEt6-00031v-00 for ; Thu, 27 May 2004 09:01:12 +0200 Original-Received: from 203-217-29-45.perm.iinet.net.au ([203.217.29.45]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 May 2004 09:01:12 +0200 Original-Received: from daniel by 203-217-29-45.perm.iinet.net.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 May 2004 09:01:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 94 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 203-217-29-45.perm.iinet.net.au Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUAAABNQ1V2fJRwboa5 t6lhXHeMlJ0YFRbc2cL7+uAVDDkqAAACZUlEQVR4nFXTv3ObMBQHcO46eLXqyuzi4LqCIrerW4WD UVbkzBVESTarOR9zLiQn5ro59N9WhJ9lMaePvu9ZwPM8zxOCCCG4ELj7BT7wvf4ipJMks/Zy18sA 3C1z/Gjd1YZMMDACxliQr8Y0nRDBtB5AYIGPNTVdxL4LKNgAUODdVUqbD7B3TsaESFIZjfDH9R+B HMIAZ00vLWETYJQQVJqp1ghEICK4ooO8zpBId+YyGxLvmI/nSFCChRq7X/gECCFOSjpEWoFnCPgx M/0Ju8MPEEQycC2GdWvxlFDS9S7VDve15uYoSPh1Capt/xyLMYEkijcgYmtdb4V7K0WwAKAPx0Lk PlD5/4lKQ7rfNHvAr9qfMwSxfjL1PTR/fcjzOYFcqS/mB9yY+lel87kHCgTY0nuwMVla6AeJFgA3 an3SuGzs/hGNcJCEQBF7ngaFsS9mAiRhCJn7yioNMvuSzoAgEuzkecDXmX2VC8Dub3nemZx0bp+X cECuki7r21XePicTqPAzcpW0Bt9Wubk/oGgAGT5FXQvXfZXVbJEonrqEd/JWPn3jaAHngFVrd7fS WeoCagSpkajWK+2vzlS5gBxBAUT0eqP2nzY0RUqpBTAd31D6e0tTNYMs/ISdCafXxxv6tgB1d5vE kNMiojfZe7QAGaPQTU9J6S6/LBJlKmUIE7yjlGZWlTNQqmIAiRP3ot4e0nQAtzENGXC16tJ97OVF LSAgXGWm7oa9tlPCUIn4zs1zmnfzYesB3M4Uhbykpmz6WRjAdCDdFBaPbWvNEoyMFGPVd9s2Dpol IBVD0G3+mAS3+A/7Wh8nJqB5AwAAAABJRU5ErkJggg== User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:71UrBKXqZinsMGQSRCMz3CCA/F0= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57744 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57744 On 27 May 2004, Ted Zlatanov wrote: > On Tue, 25 May 2004, daniel@rimspace.net wrote: [...] >> What I would like to achieve is that anything marked as unread is >> reported as ham (by email :) and then respooled on exit from the spam >> group. >> >> Everything else will be killed or marked read, then total-expired. >> I would rather *not* give everything the spam mark on entry either, >> since I use score files to really obvious stuff as read. > >> Unfortunately, it doesn't seem possible to set spam.el to process >> messages as ham without setting the group classification as 'spam'. > > Can you try spam-process-ham-in-nonham-groups? Well, I suppose I could for the spirit of scientific inquiry, if you wish, but... >> Setting the group as 'spam' means that everything gets the spam mark on >> entry... >> >> Is there a way around this, or am I asking the impossible? > > Nothing is impossible, except skiing through a revolving door :) > > I just added a new variable, > spam-mark-new-messages-in-spam-group-as-spam which is t by default. > If you set it to nil, you'll get the effect you want. ...with this set to `t', spam.el deals with mail the way I want with my spam catch-all classified as "spam", and everything else unclassified. I did need to make a couple of changes to get `spam-report-by-resend' to do the right thing with the new group parameter you added, though. Your code would bind the result of searching for the group parameter as the value of `spam-report-resend-to' unconditionally, which means that where the group parameter did not exist, the value was `nil'. This then triggered the "no set resend address" logic which, of course, didn't actually set the variable as expected, resulting in things not working as expected. If there *was* a group parameter, the result was a list containing a string with the destination address, not the address itself. That needed to be unpacked before resending... The following patch does these things, and it all works nicely for me now. Daniel Index: spam.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/spam.el,v retrieving revision 7.44 diff -u -u -r7.44 spam.el --- spam.el 26 May 2004 16:38:07 -0000 7.44 +++ spam.el 27 May 2004 06:08:20 -0000 @@ -779,9 +779,10 @@ Respects the process/prefix convention. Also see `spam-report-resend-to'." (interactive "P") - (let ((spam-report-resend-to - (gnus-parameter-spam-resend-to gnus-newsgroup-name)) - (articles (gnus-summary-work-articles n))) + (let* ((spam-report-resend-to-group-param (gnus-parameter-spam-resend-to gnus-newsgroup-name)) + (spam-report-resend-to (or (nth 0 spam-report-resend-to-group-param) + spam-report-resend-to)) + (articles (gnus-summary-work-articles n))) (spam-report-resend articles) (dolist (article articles) (gnus-summary-remove-process-mark article)))) @@ -2114,8 +2115,11 @@ (apply 'spam-report-gmane articles))) (defun spam-report-resend-register-routine (articles) - (let ((spam-report-resend-to (gnus-parameter-spam-resend-to gnus-newsgroup-name))) - (spam-report-resend articles))) + (let* ((resend-to-gp (gnus-parameter-spam-resend-to gnus-newsgroup-name)) + (spam-report-resend-to (or (and (listp resend-to-gp) + (nth 0 resend-to-gp)) + spam-report-resend-to))) + (spam-report-resend articles))) ;;;; Bogofilter -- You must not quote to me what I once said. I am wiser now. -- Romy Schneider (1966)