* Re: [??] Code snippet to forward w/ 1 key
[not found] <u7r8aomjn2.fsf@tls.cena.fr>
@ 2003-02-06 11:43 ` heddy Boubaker
0 siblings, 0 replies; only message in thread
From: heddy Boubaker @ 2003-02-06 11:43 UTC (permalink / raw)
>>>>> "I" == heddy Boubaker <boubaker@tls.cena.fr> writes:
I> The best for me will be a piece of code that send the raw msg to an
I> external filter (something I wrote already) and send the result as-is
I> (the result will already contain to dest addr)!
Thanks to my.gnus.org and al I found what I needed, thanks to helpers:
hb:gnus-summary-run-command-on-article stolen from http://my.gnus.org/Lisp/1038500213
(defun hb:spamcop-report ()
(interactive)
(let ((n (gnus-summary-article-number)))
(if (y-or-n-p (format "Send spamcop report on article %d? " n))
(let* ((msgid (or (mail-header-id (gnus-summary-article-header n))
(format "no-id-%d" n)))
;; cleanup msgid
(msgid (if (string-match "\\<\\([^\\>]+\\)\\>" msgid)
(substring msgid (match-beginning 1) (match-end 1))
msgid))
;; prepare the command
(command (concat hb:my-spamcop-reporter
;; Voir ~/.procmail/procmail.rc
" -s \'[JunkTrap] Spam report: " msgid "\'"
" -t \'" hb:my-spamcop-addr "\'"
" -f \'" user-mail-address "\'"
" -i \'" msgid "\'"
" -c sender"
" -X \'" gnus-version "\'"
)))
;; run the command
(hb:gnus-summary-run-command-on-article command)))))
(define-key gnus-summary-mode-map "X" 'hb:spamcop-report)
The real forward is done within hb:my-spamcop-reporter script, work like a
charm...
--
- heddy Boubaker -
Citation aléatoire obligatoire:
Writing about music is like dancing about architecture. (Frank Zappa)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-06 11:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <u7r8aomjn2.fsf@tls.cena.fr>
2003-02-06 11:43 ` [??] Code snippet to forward w/ 1 key heddy Boubaker
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).