Re: [exim] Dynamic "primary_hostname"

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mike Cardwell
Date:  
À: exim-users
Sujet: Re: [exim] Dynamic "primary_hostname"
* on the Wed, Jul 18, 2007 at 05:24:49AM -0500, Todd Iceton wrote:

> Wondering if there's a way to set "primary_hostname" to the sender's
> domain (for local senders only, of course), whether in exim.conf or as
> a command-line argument.


That is not possible no. It looks like you've already got the HELO
covered, that just leaves the received headers as far as I can see.
If I were you I'd set smtp_active_hostname as follows:

smtp_active_hostname = ${lookup{$sender_address_domain}lsearch{/etc/domainips_reverse}{$value}{$primary_hostname}}

And then change the received_header_text to:

received_header_text=\
Received: ${if def:sender_rcvhost {from $sender_rcvhost\n\t}\
          {${if def:sender_ident {from ${quote_local_part:$sender_ident} }}\
          ${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}\
          by $smtp_active_hostname \
          ${if def:received_protocol {with $received_protocol}} \
          ${if def:tls_cipher {($tls_cipher)\n\t}}\
          (Exim $version_number)\n\t\
          ${if def:sender_address {(envelope-from <$sender_address>)\n\t}}\
          id $message_exim_id\
      ${if def:received_for {\n\tfor $received_for}}\


The above is the default value of received_header_text but with
$primary_hostname changed to $smtp_active_hostname

Mike