[Pkg-exim4-users] Setting per-destination HELO values

Adam Nielsen a.nielsen at shikadi.net
Sat Jan 8 04:24:57 UTC 2011


>> The server is a mail hub, so mail goes in and out on a number of
>> different network interfaces, each with a different IP and hostname.
>> By default the server's hostname is sent as the HELO value on all
>> interfaces, but the hostname only matches one of the IPs - on all the
>> others the mismatch between IP and HELO value triggers various spam
>> filters.
>
> As far as I see this is not possible with the default Debian Exim config
> system.
>
> But I also think you don't need more than one custom transport. I use
> the following one for a setup quite like yours:
>
> remote_smtp:
>    driver = smtp
>    helo_data = ${lookup dnsdb{ptr=$sending_ip_address}{$value}{$primary_hostname}}
>
> This will set the HELO/EHLO value according the the hostname of the
> sending IP or to the primary_hostname, if the lookup fails.

Ah interesting, thanks for your quick response!  I think this is what 
REMOTE_SMTP_HELO_FROM_DNS does, but enabling it didn't work for me and I now 
realise it was because it only seems to apply to the remote_smtp_smarthost 
transport, not remote_smtp.  However I was able to avoid creating a custom 
transport by specifying your code in my main definition file as the global 
HELO override:

REMOTE_SMTP_HELO_DATA = ${lookup 
dnsdb{ptr=$sending_ip_address}{$value}{$primary_hostname}}

So far this seems to be working...

I guess it would be worth extending REMOTE_SMTP_HELO_FROM_DNS to apply to all 
remote_smtp transports instead of just the smarthost one.

Cheers,
Adam.



More information about the Pkg-exim4-users mailing list