Re: [exim] SMTP Transport: hosts rewriting

Góra strony
Delete this message
Reply to this message
Autor: christian meutes
Data:  
Dla: Philip Hazel, Peter Bowyer
CC: exim-users
Temat: 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/