RE: [exim] $primary_hostname and $smtp_active_hostname

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Eli
CC: exim-users
Tárgy: RE: [exim] $primary_hostname and $smtp_active_hostname
On Fri, 4 Mar 2005, Eli wrote:

> Oh, I knew that is what it was for - I remember when the feature was
> discussed and I was happy to see it get added, as I could see myself using
> this feature. I was just wondering if both variables end up with the same
> value or not because I see many more uses for $smtp_active_hostname than
> *JUST* in the HELO greeting. The way the documentation reads (to me) it
> sounds as though both $primary_hostname and $smtp_active_hostname would end
> up carrying the same value all the time. If they don't, that's better as I
> see needs to keep the values separate.


They don't. $primary_hostname NEVER changes. $smtp_active_hostname
defaults to $primary_hostname, but can be changed for each incoming
connection.

> That's all I was saying - I was wondering why the change was made to just
> the smtp_banner and not everywhere if this was the use for it - changing it
> everywhere shouldn't cause any side effects since $smtp_active_hostname is
> apparently saved the entire lifetime of the message.


In fact, the change to the banner and the introduction of the
$smtp_active_hostname variable came a couple of releases AFTER the
smtp_active_hostname option was invented. As it says in the doc:

smtp_active_hostname      Use: main   Type: string*            Default: unset


    This option is provided for multi-homed servers that want to masquerade as
    several different hosts. At the start of an SMTP connection, its value is
    expanded and used instead of the value of $primary_hostname in SMTP
    responses. For example, it is used as domain name in the response to an
    incoming HELO or EHLO command. It is also used in HELO commands for        |
    callout verification. The active hostname is placed in the $smtp_active_   |
    hostname variable, which is saved with any messages that are received. It  |
    is therefore available for use in routers and transports when the message  |
    is later delivered.                                                        |


Note that the latter part of that has change bars, so is new.



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