Gnus development mailing list
 help / color / mirror / Atom feed
From: "Arne Jørgensen" <arne+usenet@daimi.au.dk>
Subject: gnus-alter-header-function and mail-header-set-*
Date: Wed, 27 Feb 2002 14:22:51 +0100	[thread overview]
Message-ID: <a5imsc$u5$1@quimby2.netfonds.no> (raw)

Hi,

When Euddora redirects (their version of our 'S D r') mail it changes
the from field to

From: redirecters@address.org (Original Sender <original@sender.org> (by way of Redirecter Foo))

This has annoyed me for a long time (BBDB suggests I change the
address og Original Sender to redirecters@address.org. And then I
don't like that kind of header.

So I looked in the manual and section 3.9.1.4 is almost a solution to
my problem.

Two problems occured though.

The manual is wrong; the arguments of mail-header-set-* should be
header string, not string header.

When I use my code below it seems it only changes the from field when
building the summary buffer and not when displaying the article
buffer.

Any comments? Should I alter the header from somewhere else (a hook)?


;; Wash Eudoras redirected-by-style from header
(defun arj-gnus-alter-eudora-redirected-from-header (header)
  "Alter Eudoras redirected-by-style from header"
  (let ((from (mail-header-from header)))
    (when (string-match
	   "\\(.*\\) (\\(.*\\) (by way of \\(.*\\)))" from)
      (mail-header-set-from header (match-string 2 from))
      )))

(setq gnus-alter-header-function 'arj-gnus-alter-eudora-redirected-from-header)


Regards,

        /arne
-- 
stud. scient. Arne Jørgensen
Kollegium 5, 2., v. 222, Universitetsparken, 8000 Århus C
tlf: 89 42 72 22, mobil: 21 65 01 13
e-post: arne@daimi.au.dk, http://www.daimi.au.dk/~arne/



             reply	other threads:[~2002-02-27 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-27 13:22 Arne Jørgensen [this message]
2002-02-27 13:22 Arne Jørgensen
2003-01-02  2:19 ` Lars Magne Ingebrigtsen

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='a5imsc$u5$1@quimby2.netfonds.no' \
    --to=arne+usenet@daimi.au.dk \
    /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).