Gnus development mailing list
 help / color / mirror / Atom feed
* Unprintable characters
@ 2005-01-10 12:30 Norman Walsh
       [not found] ` <87mzvhh3g2.fsf-wnzGKDmzZYLQT0dZR+AlfA@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Norman Walsh @ 2005-01-10 12:30 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

I'm in the process of switching over to using dspam for spam filtering.
That means I'm doing a lot of training these days and training for dspam
means forwarding the messages back to the server.

Lots of spam contains unprintable characters. Is there anyway to make
gnus default to ignoring this situation instead of asking me if I'm
sure I want to send them?

Additionally, is there any way to process-mark a bunch of articles and
then have them each individually forwarded to a particular address?

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Everything should be made as simple as
http://nwalsh.com/            | possible, but no simpler.

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unprintable characters
       [not found] ` <87mzvhh3g2.fsf-wnzGKDmzZYLQT0dZR+AlfA@public.gmane.org>
@ 2005-01-10 12:51   ` Jochen Küpper
  0 siblings, 0 replies; 5+ messages in thread
From: Jochen Küpper @ 2005-01-10 12:51 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 3753 bytes --]

Norman Walsh <ndw-wnzGKDmzZYLQT0dZR+AlfA@public.gmane.org> writes:

> Additionally, is there any way to process-mark a bunch of articles and
> then have them each individually forwarded to a particular address?

I send them as a digest instead of individual messages, but here we go:
,----
| (defvar jk/spam-report-address "spam@somewhere"
|   "Email-address to report ill-classified spam.")
| (defvar jk/ham-report-address "nospam@somewhere"
|   "Email-address to report ill-classified ham.")
| (defvar jk/spam-target "nnimap+some:spam/misc"
|   "Group to move reported spam too.")
| 
| (defun jk/ham-spam-report (to-address)
|   "Digest and forward all articles in this series to the specified address."
|   (let
|       ((gnus-uu-digest-headers nil)
|        (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"))
|     ;; From: (Heinz only accepts reports from internal address)
|     (goto-char (point-min))
|     (when (re-search-forward "^From:")
|       (delete-region (point) (point-at-eol))
|       (insert " jochen-xIDITz2oXuw@public.gmane.org"))
|     ;; Reply-To: (Heinz only accepts reports from internal address)
|     (goto-char (point-min))
|     (when (re-search-forward "^Reply-To:" (point-max) t)
|       (delete-region (point) (point-at-eol))
|       (insert " jochen-xIDITz2oXuw@public.gmane.org"))
|     ;; 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:" (point-max) t)
|       (delete-region (point-at-bol) (point-at-eol))
|       (insert "Gcc: nnimap+some:sent/" (format-time-string "%Y/%m")
|               " nnimap+some:spam/reported"))
|     ;; remove signature
|     (when (message-goto-signature)
|       (delete-region (- (point) 4) (point-max)))
|     ;; and send
|     (message-send-and-exit)))
| 
| (defun jk/ham-report ()
|   "Digest and forward all articles in this series to nospam@somewhere."
|   (interactive)
|   (jk/ham-spam-report  jk/ham-report-address))
| 
| (defun jk/spam-report ()
|   "Digest and forward all articles in this series to spam@somewhere.
| In addition move the marked articles to a different group (specified in
| `jk/spam-target')."
|   (interactive)
|   (gnus-summary-save-process-mark)
|   (jk/ham-spam-report jk/spam-report-address)
|   (gnus-summary-yank-process-mark)
|   (gnus-summary-move-article nil jk/spam-target))
`----

Some more minor features, but it should work for you as well.

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.)

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unprintable characters
  2005-01-10 12:30 Unprintable characters Norman Walsh
       [not found] ` <87mzvhh3g2.fsf-wnzGKDmzZYLQT0dZR+AlfA@public.gmane.org>
@ 2005-01-10 13:10 ` Francis Litterio
  2005-01-10 13:19   ` Romain Francoise
  2005-01-10 13:18 ` Romain Francoise
  2 siblings, 1 reply; 5+ messages in thread
From: Francis Litterio @ 2005-01-10 13:10 UTC (permalink / raw)


Norman Walsh wrote:

> I'm in the process of switching over to using dspam for spam filtering.
> That means I'm doing a lot of training these days and training for dspam
> means forwarding the messages back to the server.
>
> Lots of spam contains unprintable characters. Is there anyway to make
> gnus default to ignoring this situation instead of asking me if I'm
> sure I want to send them?

What specifically is the question that Gnus asks?  I grepped the Gnus
sources for the string "unprint", and it appears nowhere.
--
Francis Litterio
franl <at> world . std . com




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unprintable characters
  2005-01-10 12:30 Unprintable characters Norman Walsh
       [not found] ` <87mzvhh3g2.fsf-wnzGKDmzZYLQT0dZR+AlfA@public.gmane.org>
  2005-01-10 13:10 ` Francis Litterio
@ 2005-01-10 13:18 ` Romain Francoise
  2 siblings, 0 replies; 5+ messages in thread
From: Romain Francoise @ 2005-01-10 13:18 UTC (permalink / raw)


Norman Walsh <ndw@nwalsh.com> writes:

> Lots of spam contains unprintable characters. Is there anyway to make
> gnus default to ignoring this situation instead of asking me if I'm
> sure I want to send them?

Frob `message-syntax-checks', the `illegible-text' check is what you're
looking for.

-- 
Romain Francoise <romain@orebokech.com> | Every sky is blue, but not
it's a miracle -- http://orebokech.com/ | for me and you.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unprintable characters
  2005-01-10 13:10 ` Francis Litterio
@ 2005-01-10 13:19   ` Romain Francoise
  0 siblings, 0 replies; 5+ messages in thread
From: Romain Francoise @ 2005-01-10 13:19 UTC (permalink / raw)


Francis Litterio <franl@world.std.com> writes:

> What specifically is the question that Gnus asks?  I grepped the Gnus
> sources for the string "unprint", and it appears nowhere.

See the code in message.el starting at line 3616.

-- 
Romain Francoise <romain@orebokech.com> | Why did you kill that poor
it's a miracle -- http://orebokech.com/ | old man, melody? She said,
                                        | "He was never good to me"



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-01-10 13:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-10 12:30 Unprintable characters Norman Walsh
     [not found] ` <87mzvhh3g2.fsf-wnzGKDmzZYLQT0dZR+AlfA@public.gmane.org>
2005-01-10 12:51   ` Jochen Küpper
2005-01-10 13:10 ` Francis Litterio
2005-01-10 13:19   ` Romain Francoise
2005-01-10 13:18 ` Romain Francoise

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).