Re: [exim] SMTP Transport: hosts rewriting

Page principale
Supprimer ce message
Répondre à ce message
Auteur: christian meutes
Date:  
À: Philip Hazel, Peter Bowyer
CC: exim-users
Sujet: Re: [exim] SMTP Transport: hosts rewriting
> Your original attempt, namely
>
> remote_smtp:
> driver = smtp
> hosts_override = true
> hosts = ${if eq{$host}{10.10.10.10}{$host}{172.20.20.20}}
>
> Doesn't work because $host is not set at this point. But if you can
> somehow identify the domains, a special transport with hosts_override
> might do the trick. One way could be to do your own DNS lookups using
> dnsdb, as suggested already.
>

I got it working!
I permute the return values and used $host_address instead of $host like
this:

remote_smtp:
driver = smtp
hosts_override = true
hosts = ${if eq {$host_address}{10.10.10.10}{172.20.20.20{$host_address}}

Why does this work, can this be true or did i make a mistake when testing
it?


Christian Meutes
systems engineer
--
claranet gmbh internet service provider
tel +49 (0) 69 - 40 80 18 - 300
email: christian.meutes@??? http://www.claranet.de/