Re: [Exim] Header rewriting - From: fields comment and phras…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Ray Gardener
CC: exim-users
Betreff: Re: [Exim] Header rewriting - From: fields comment and phrase elements
On Wed, 12 Jan 2000, Ray Gardener wrote:

> Because we have two internal mail systems linked by SMTP. Both of this
> use unfriendly mailbox names in the headers which make it difficult for
> users in other systems to work out who the mail was from. One system
> generates and displays the comment element in a from: field
>
> <R.a.gardener@???> (Ray Gardener)
>
> whilst the other generates and displays the only the phrase element.
>
> "Ray Gardener" <r.a.gardener@???>
>
> The result is that when mail is sent between the two systems the extra
> "displayed name" info is not shown.


Then your systems are broken. Both those forms are legal, and in mail
received from the outside world you will see both forms. User Agents
that work well recognize both forms and handle them correctly. Pine, for
example. (And then there are the pathological cases, such as the one
Vadim quoted.)

> So what I wish to do is to the rewrite from: headers so that display
> name component can be displayed.
> I will look into the w option of the rewriting rules.


It will only be useful if you can deduce "Ray Gardener" from
<r.a.gardener@???> because its input is only the "real" address,
not the rest of the RFC 822 address. But then that is probably the only
sensible approach to this problem, because deciding what to do with

From: Philip "Q." Hazel (Exim author) <ph10@(this is in
Cambridge)cus.cam.ac.uk> (there's only one "l" in "Philip")

is not a job for a regular expression.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.