Re: [Exim] Rewrite rules not applied to unqualified addresse…

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Tore Anderson
CC: exim-users
Assumpte: Re: [Exim] Rewrite rules not applied to unqualified addresses in headers?
On Thu, 3 Jun 2004, Tore Anderson wrote:

> But why, then, doesn't the 'w' flag change this? As I read the
> specification that should make the rewrite rule apply to the entire
> header, not only the address part..?


w applies rewriting to a whole RFC (2)822 address, not the whole header.
An unqualified local part is not a syntactically valid RFC (2)822
address.

> During my foiled testing of the rewrite facilities I noticed
> something strange I thought you might be interested in. If I set
> headers_rewrite in a transport, the From header will automatically
> be qualified with qualify_domain - even if the rewrite rule doesn't
> match!


From the manual (see the second para):

44.10 The From: header line

If a locally-generated incoming message does not contain a From: header line,  |
Exim adds one containing the sender's address. The calling user's login name   |
and full name are used to construct the address, as described in section       |
44.16. They are obtained from the password data by calling "getpwuid()" (but   |
see the "unknown_login" configuration option). The address is qualified with
"qualify_domain".


For compatibility with Sendmail, if an incoming, non-SMTP message has a From:
header line containing just the unqualified login name of the calling user,
this is replaced by an address containing the user's login name and full name
as described in section 44.16.

...

44.16 Constructed addresses

When Exim constructs a sender address for a locally-generated message, it uses
the form

<user name> <<login>@<qualify_domain>>

For example:

Zaphod Beeblebrox <zaphod@???>


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book