Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Forward message with all headers in lisp
@ 2002-04-21 18:07 Kalle Valo
       [not found] ` <oul1yd8hpbk.fsf@ID-97657.usr.dfncis.de>
  0 siblings, 1 reply; 2+ messages in thread
From: Kalle Valo @ 2002-04-21 18:07 UTC (permalink / raw)


Our postmasters have requested that all received spam should be
forwarded to our local spam list. Currently I do it manually, but
it's getting cumbersome with the amount of daily spam I receive.

I forward spam with C-c C-f in article buffer, add the list address to
TO header and send it with C-c C-c. What I would like to have is a
function which would just send the message with all headers intact as
quickly as possible.

I tried to write this function by myself, but couldn't do it. (I know
only the basics of lisp.) gnus-summary-mail-forward doesn't have an
argument for address and gnus-summary-resend-message doesn't send the
message unaltered (at least I understood it that way).

I would need help with this. I have GNU Emacs 21.1.1 with Gnus 5.9.0
and Debian GNU/Linux sid.

-- 
Kalle Valo


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

* Re: Forward message with all headers in lisp
       [not found] ` <oul1yd8hpbk.fsf@ID-97657.usr.dfncis.de>
@ 2002-04-22  5:48   ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2002-04-22  5:48 UTC (permalink / raw)


lawrence mitchell <wence@gmx.li> writes:

> > What I would like to have is a function which would just send the
> > message with all headers intact as quickly as possible.
>
> Would something like this work?
> 
> (defun kv-forward-spam ()
>   "Forward the selected mail to a specific address."
>   (interactive)
>   (gnus-summary-mail-forward)
>   (message-goto-to) ; goto the To: header
>   (insert "forwardaddress") ; insert the correct address here.
>   (message-send-and-exit)) ; send the mail and exit.

Yes, it worked perfectly. Just what I needed. Thank you!

> If you want to make sure you don't do this accidently, you could wrap
> everything except the call to (interactive) in an if statement:
> (interactive)
> (if (yes-or-no-p "Really forward this mail as spam? ")
>     (progn
>       ...)
>   (message "Mail not sent"))

The confirmation is a needed feature. I will use this.

-- 
Kalle Valo


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

end of thread, other threads:[~2002-04-22  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-21 18:07 Forward message with all headers in lisp Kalle Valo
     [not found] ` <oul1yd8hpbk.fsf@ID-97657.usr.dfncis.de>
2002-04-22  5:48   ` Kalle Valo

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