From: "Jochen Küpper" <jochen-+It19tn3Rl9sbm7dSapR3bNAH6kLmebB@public.gmane.org>
Subject: Re: Gnus SPAM support, and email based reporting.
Date: Mon, 19 Apr 2004 00:05:29 +0200 [thread overview]
Message-ID: <8665bxq6vq.fsf@doze.rz-berlin.mpg.de> (raw)
In-Reply-To: <87isfy7p6a.fsf-kiwxAyAbAnkGAYDEi5AF0l6hYfS7NtTn@public.gmane.org> (Daniel Pittman's message of "Sat, 17 Apr 2004 22:40:45 +1000")
On Sat, 17 Apr 2004 22:40:45 +1000 Daniel Pittman wrote:
Daniel> So, to report an incorrectly classified message, I need to
Daniel> resend the message as-is to a specific address on the server,
Daniel> then delete it locally.
Well, I have to send it as an MIME attachment, but his is what I use;
might be a starting point:
(defun jk/ham-spam-report (to-address)
"Digest and forward all articles in this series to the specified address."
(let
((gnus-uu-save-in-digest t)
(file (mm-make-temp-file (nnheader-concat gnus-uu-tmp-dir "spam-report")))
(message-forward-as-mime t)
(mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets)
gnus-uu-digest-buffer subject from)
(let ((gnus-article-reply (gnus-summary-work-articles nil)))
(gnus-setup-message 'forward
(setq gnus-uu-digest-from-subject nil)
(setq gnus-uu-digest-buffer
(gnus-get-buffer-create " *gnus spam-report*"))
(gnus-uu-decode-save nil file)
(switch-to-buffer gnus-uu-digest-buffer)
(let ((message-forward-decoded-p t))
(message-forward nil t))))
(setq gnus-uu-digest-from-subject nil)
;; Ok, finish mail
;; Subject:
(goto-char (point-min))
(when (re-search-forward "^Subject: ")
(delete-region (point) (point-at-eol))
(insert "ham/spam report"))
;; To:
(goto-char (point-min))
(when (re-search-forward "^To:")
(delete-region (point) (point-at-eol))
(insert " " to-address))
;; Gcc
(goto-char (point-min))
(when (re-search-forward "^Gcc:")
(delete-region (point-at-bol) (point-at-eol))
(insert " nnimap+FHI:sent/" (format-time-string "%Y/%m")
" nnimap+FHI:spam/reported"))
;; remove signature
(when (message-goto-signature)
(delete-region (- (point) 4) (point-max)))
;; and send
(message-send-and-exit)
;; finally, mark articles expire-able
))
(defun jk/ham-report ()
"Digest and forward all articles in this series to nospam-+It19tn3Rl8lNQzPPfjNRg==@public.gmane.orgde."
(interactive)
(jk/ham-spam-report "nospam-o3gYboyLymOzQB+pC5nmwQ==@public.gmane.org"))
(defun jk/spam-report ()
"Digest and forward all articles in this series to spam-+It19tn3Rl9sbm7dSapR3bNAH6kLmebB@public.gmane.org."
(interactive)
(jk/ham-spam-report "spam-o3gYboyLymOzQB+pC5nmwQ==@public.gmane.org"))
Greetings,
Jochen
--
Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de
Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D
(Part 3 you find in my messages before fall 2003.)
prev parent reply other threads:[~2004-04-18 22:05 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
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 ` Jochen Küpper [this message]
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=8665bxq6vq.fsf@doze.rz-berlin.mpg.de \
--to=jochen-+it19tn3rl9sbm7dsapr3bnah6klmebb@public.gmane.org \
/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).