Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-alter-header-function and mail-header-set-*
@ 2002-02-27 13:22 Arne Jørgensen
  2003-01-02  2:19 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Arne Jørgensen @ 2002-02-27 13:22 UTC (permalink / 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/



^ permalink raw reply	[flat|nested] 3+ messages in thread
* gnus-alter-header-function and mail-header-set-*
@ 2002-02-27 13:22 Arne Jørgensen
  0 siblings, 0 replies; 3+ messages in thread
From: Arne Jørgensen @ 2002-02-27 13:22 UTC (permalink / 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/



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

end of thread, other threads:[~2003-01-02  2:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-27 13:22 gnus-alter-header-function and mail-header-set-* Arne Jørgensen
2003-01-02  2:19 ` Lars Magne Ingebrigtsen
2002-02-27 13:22 Arne Jørgensen

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