From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57298 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: Sat, 15 May 2004 23:27:27 +1000 Sender: ding-owner@lists.math.uh.edu Message-ID: <87lljt2534.fsf@enki.rimspace.net> References: <87isfy7p6a.fsf@enki.rimspace.net> <1xmm1vhg.fsf@random.localnet.unwireduniverse.com> <4nzn95gwu7.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 1084627921 14398 80.91.224.253 (15 May 2004 13:32:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 May 2004 13:32:01 +0000 (UTC) Original-X-From: ding-owner+M5838@lists.math.uh.edu Sat May 15 15:31:51 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 1BOzGZ-0003z7-00 for ; Sat, 15 May 2004 15:31:51 +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 1BOzFE-0004mf-00; Sat, 15 May 2004 08:30:28 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BOzF5-0004mX-00 for ding@lists.math.uh.edu; Sat, 15 May 2004 08:30:19 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BOzF3-0001vg-7r for ding@lists.math.uh.edu; Sat, 15 May 2004 08:30:17 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id 162593A0044 for ; Sat, 15 May 2004 08:30:15 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BOzEy-0003Bd-00 for ; Sat, 15 May 2004 15:30: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 ; Sat, 15 May 2004 15:30: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 ; Sat, 15 May 2004 15:30:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 87 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:rA9Y72yaBG1VDvejSYrw1NzPg/0= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57298 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57298 On 22 Apr 2004, Ted Zlatanov wrote: > On Sat, 17 Apr 2004, Derrell.Lipman@unwireduniverse.com wrote: > >> Daniel Pittman writes: >> >>> So, to report an incorrectly classified message, I need to resend >>> the message as-is to a specific address on the server, then delete >>> it locally. >> >> I would begin using the gnus spam support as well, if that feature >> were available! (I haven't seen anything indicating that it is.) > > We can add something like Jochen Kupper's code to spam-report.el if > everyone is OK with it. Patches are preferred, I won't be able to > get to it right away. 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... 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. Ah, well. Hopefully someone who knows the code better can point the way to getting this registered to process spam messages on exit, and post a short howto guide that tells me: 1. how to get the spam mark code activated 2. how to get the 'report by resend' code used 3. how to *not* use any of the other features Thanks, Daniel Index: spam-report.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/spam-report.el,v retrieving revision 7.7 diff -u -u -r7.7 spam-report.el --- spam-report.el 25 Feb 2004 23:53:49 -0000 7.7 +++ spam-report.el 15 May 2004 13:22:15 -0000 @@ -79,6 +79,13 @@ :type 'file :group 'spam-report) + +(defcustom spam-report-resend-to nil + "Email address that spam articles are resent to when reporting." + :type 'string + :group 'spam-report) + + (defvar spam-report-url-ping-temp-agent-function nil "Internal variable for `spam-report-agentize' and `spam-report-deagentize'. This variable will store the value of `spam-report-url-ping-function' from @@ -108,6 +115,23 @@ (spam-report-url-ping host report)) (gnus-message 3 "Could not find X-Report-Spam in article %d..." article))))))) + + +(defun spam-report-resend (&rest articles) + "Report an article as spam by resending via email." + (dolist (article articles) + (gnus-message 6 "Reporting spam article %d to <%s>..." article spam-report-resend-to) + ;; This is ganked from the `gnus-summary-resend-message' function. + ;; It involves rendering the SPAM, which is undesirable, but there does + ;; not seem to be a nicer way to achieve this to my limited knowledge. + ;; -- + ;; select this particular article + (gnus-summary-select-article nil nil nil article) + ;; resend it to the destination address + (save-excursion + (set-buffer gnus-original-article-buffer) + (message-resend spam-report-resend-to)))) + (defun spam-report-url-ping (host report) "Ping a host through HTTP, addressing a specific GET resource using -- It is preoccupation with possessions, more than anything else, that prevents us from living freely and nobly. -- Bertrand Russell