Re: [EXIM] Rewritten From: Lines from Local Users

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Ephraim Silverberg
CC: exim-users
Tárgy: Re: [EXIM] Rewritten From: Lines from Local Users
On Tue, 6 Jan 1998, Ephraim Silverberg wrote:

> I realise that from a MTA-purity point-of-view, the MTA should be reticent
> in changing a legal header produced by an MUA, but since 'qualify_domain'
> is allowed, could a 'qualify_full_name' option be added to Exim that would
> force adding the GECOS field to the From: line even when it already exists?


I am a bit unhappy about adding too many MUA functions to an MTA, but of
course that line was crossed long ago.

You might be able to coerce Exim into doing this with a rewriting rule,
except that the patterns in rewriting rules match only the "active" part
of an address, not the whole thing, so you can't tell if there is
something there already. Completely *replacing* the From line, whatever is
there already, can be done today:

*@local.domain  "${lookup{$local_part}lsearch{/etc/passwd}\
                {${if match{$value}{^(?:[^:]*:)\\{3\\}([^:]+)}\
                {$1 }}}}\
                <$local_part@$domain>"    fw 


This will be easier once Nigel Metheringham's new operator to pick out a
delimited field is available. I have tested this monstrosity. It does
work! However, it assumes that the contents of the GECOS field can be
placed verbatim into a From line.

The problem with adding to an already existing from line is in deciding
when to do it, I suspect. Does snedmail do it for any or all of

From: abcd
From: <abcd>
From: <abcd> ()
From: abcd ()
From: () abcd
From: Joe <abcd> Doe

If it is wanted only for the first one (or two) then things are
relatively simple. What happens if user Joe Doe (login = abcd) sends a
message containing

From: xyz

? What Exim does in that case is to add a Sender: header, which does
include the gecos field.



-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***