Re: [exim] Choosing the outbound IP address according to a D…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Chris Siebenmann
Data:  
Para: mje
CC: Users, Exim, cks
Asunto: Re: [exim] Choosing the outbound IP address according to a Database query.
> In Transports - I have something like:-
>
> begin transports
>
> # This transport is used for delivering messages over SMTP connections.
> remote_smtp:
>   driver = smtp
>   dnssec_request_domains = *
>   hosts_try_dane = *
>   return_path = ${address:$reply_address}
>   interface = <; 192.111.222.1 ; 2001:1234:abcd:5678::1
>
> So could the "interface =" part be changed to receive the result of a
> MySQL query?
> Can I pop a value into a variable - and use that? - otherwise I'll be
> doing two lookups, one for IPv4 and one for IPv6...


The transport 'interface =' is string-expanded, so you can use anything
here that you can use as a normal string expansion, including MySQL
queries. We have some Exim servers with a relatively complex set of
conditions here (although we don't use MySQL lookups) and it works fine.

You may also find it more convenient to set this information up
earlier, for example in an ACL (as a message ACL variable) or during
routing (eg in $address_data), and then simply use it in the transport,
rather than looking it up every time in the transport.

    - cks