From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57674 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus SPAM support, and email based reporting. Date: Mon, 24 May 2004 21:09:15 +1000 Sender: ding-owner@lists.math.uh.edu Message-ID: <87d64uaxpg.fsf@enki.rimspace.net> References: <87isfy7p6a.fsf@enki.rimspace.net> <1xmm1vhg.fsf@random.localnet.unwireduniverse.com> <4nzn95gwu7.fsf@lifelogs.com> <87lljt2534.fsf@enki.rimspace.net> <4nfz9xbirq.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 1085397066 3921 80.91.224.253 (24 May 2004 11:11:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 May 2004 11:11:06 +0000 (UTC) Original-X-From: ding-owner+M6214@lists.math.uh.edu Mon May 24 13:10:54 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 1BSDM6-0006nI-00 for ; Mon, 24 May 2004 13:10:54 +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 1BSDLd-0007lL-00; Mon, 24 May 2004 06:10: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 1BSDLV-0007lF-00 for ding@lists.math.uh.edu; Mon, 24 May 2004 06:10:17 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BSDLT-0006FR-NG for ding@lists.math.uh.edu; Mon, 24 May 2004 06:10:15 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id 63ACE3A0058 for ; Mon, 24 May 2004 06:10:14 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BSDLR-0004Ln-00 for ; Mon, 24 May 2004 13:10:13 +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 ; Mon, 24 May 2004 13:10:13 +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 ; Mon, 24 May 2004 13:10:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 102 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 203-217-29-45.perm.iinet.net.au User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:n28Tp04tNFKASaasLmhHBP11gHE= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57674 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57674 On 19 May 2004, Ted Zlatanov wrote: > On Sat, 15 May 2004, daniel@rimspace.net wrote: Sorry for taking so long to get back to you on this; real life got in the way. >> Well, having a quick poke around turned up some bits and pieces of >> code that I got to do the right thing pretty easily in terms of doing >> the resend... > > Are your FSF papers on file? I don't know how to check. Yes, I have papers for Gnus on file. IIRC, the only way to check is to mail the people at fencepost and ask, or to remember, or to ask the submitter. :) >> I had a look at spam.el to see if I could work out how to hook it up >> to the actual spam mark stuff and, boy, was that a shock. >> >> I got lost somewhere around the second or third abstraction around >> what really did look like very much the same code. > > I'm planning to do a major overhaul (version 3 of spam.el, so to > speak) where a lot of the unnecessary complexity is at least only > done once. Probably by the end of the year. It struck me that there was an awful lot of writing of wrapper functions around what is, at heart, pipe to command A to learn as spam, or command B to learn as ham. OTOH, I don't really understand your code so well and I am probably missing the reason why a bunch of this complexity exists. [...] >> 2. how to get the 'report by resend' code used > > With spam.el, you just make (spam spam-use-resend) the exit > processor of the group. All spam articles will be processed > through it. That didn't work. I needed to add to the group parameters: (spam-process (gnus-group-spam-exit-processor-report-resend)) The other one didn't trigger, for some reason. [...] > I'm attaching the patch that sets up a new spam exit processor for > this purpose. Please test and get back to me if you are OK with > it. It worked, and let me debug my code. I had to make the following change to current CVS, since `spam-report-resend' is passed a list of articles, not a variable number of arguments. Er, and finally, I think that it would be better to set `defcustom spam-report-resend-to' to `nil' by default. Then, in the report function we could test that address and if it was `nil', display an error to the user and instruct spam.el to mark the article as "not processed" That seems more user-friendly to me. Alternately, we could actually prompt for the destination and save that with custom, but I don't know how to do that - custom is still a mysterious (and probably explosive) black box to me. :) Daniel ] cvs diff -u lisp/spam.el Index: lisp/spam-report.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/spam-report.el,v retrieving revision 7.9 diff -u -r7.9 spam-report.el --- lisp/spam-report.el 20 May 2004 18:32:35 -0000 7.9 +++ lisp/spam-report.el 24 May 2004 11:06:07 -0000 @@ -93,7 +93,7 @@ before `spam-report-agentize' was run, so that `spam-report-deagentize' can undo that change.") -(defun spam-report-resend (&rest articles) +(defun spam-report-resend (articles) "Report an article as spam by resending via email." (dolist (article articles) (gnus-message 6 @@ -133,6 +133,7 @@ (spam-report-url-ping host report)) (gnus-message 3 "Could not find X-Report-Spam in article %d..." article))))))) + (defun spam-report-url-ping (host report) "Ping a host through HTTP, addressing a specific GET resource using -- Champagne has the taste of an apple peeled with a steel knife. -- Aldous Huxley