Gnus development mailing list
 help / color / mirror / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
Subject: Re: Gnus SPAM support, and email based reporting.
Date: Mon, 24 May 2004 21:09:15 +1000	[thread overview]
Message-ID: <87d64uaxpg.fsf@enki.rimspace.net> (raw)
In-Reply-To: <4nfz9xbirq.fsf@lifelogs.com>

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




  reply	other threads:[~2004-05-24 11:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-17 12:40 Daniel Pittman
2004-04-17 15:20 ` Derrell.Lipman
2004-04-21 15:44   ` Ted Zlatanov
2004-04-22  9:10     ` Steinar Bang
     [not found]       ` <87fzawgyxq.fsf-1rLz5CwDoL8@public.gmane.org>
2004-04-22 16:23         ` Jochen Küpper
2004-04-22 20:11           ` Ted Zlatanov
     [not found]             ` <4n1xmfept2.fsf-mIZUurteI1BWk0Htik3J/w@public.gmane.org>
2004-04-22 21:32               ` Jochen Küpper
2004-04-23 16:15                 ` Ted Zlatanov
2004-04-22 18:35       ` Ted Zlatanov
2004-04-23  5:34         ` Steinar Bang
2004-04-23  7:45           ` Daniel Pittman
2004-04-23 16:17           ` Ted Zlatanov
2004-05-15 13:27     ` Daniel Pittman
2004-05-18 20:08       ` Ted Zlatanov
2004-05-24 11:09         ` Daniel Pittman [this message]
2004-05-24 11:39           ` Kai Grossjohann
2004-05-24 14:07             ` Daniel Pittman
2004-05-24 14:12               ` Kai Grossjohann
2004-05-26 19:00                 ` Michael Schierl
2004-05-24 13:44           ` Ted Zlatanov
2004-05-24 14:18             ` Daniel Pittman
2004-05-24 17:40               ` Ted Zlatanov
2004-05-24 18:07                 ` Daniel Pittman
2004-05-24 18:50                   ` Ted Zlatanov
2004-05-24 18:52             ` spam.el processor code refactored (was: Gnus SPAM support, and email based reporting.) Ted Zlatanov
     [not found] ` <87isfy7p6a.fsf-kiwxAyAbAnkGAYDEi5AF0l6hYfS7NtTn@public.gmane.org>
2004-04-18 22:05   ` Gnus SPAM support, and email based reporting Jochen Küpper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d64uaxpg.fsf@enki.rimspace.net \
    --to=daniel@rimspace.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).