Hello!

On Wed, 01 Feb 2017 at 11:08:55 (+0200), Marius Stan wrote:

> I'm using this construct to select an outgoing interface:

> dkim_smtp:

>    driver = smtp
>    max_rcpt =9
>    dkim_domain = $sender_address_domain
>    dkim_selector = biz
>    dkim_private_key = /etc/exim/private.key
>    dkim_canon = relaxed
>    multi_domain = false
>    interface = <;${lookup mysql{Q_OUTGOING_INTERFACE}};$received_ip_address

> the Q_OUTGOING_INTERFACE query returns either an empty string or an IP 
> address.

> In the case of an empty string exim should choose from the rest of 
> values, e.g. $received_ip_address

> But in all cases I get this error, like expansion never happened:

>   R=dnslookup T=dkim_smtp defer (-1): "" is not a valid IP address for 
> the "interface" option for dkim_smtp transport

As far as I can see it's a documented behavior:
"Empty values and values containing spaces are double quoted, with embedded 
quotes escaped by a backslash."

> What can I do to get full debug on a transport ?

Should you just try to return default value from MySQL? Something like this:
SELECT COALESCE(`field_that_might_be_empty`, "$received_ip_address") FROM ... 
WHERE ...

> Using centos 7 with default exim-4.84.2

> Thanks,

> Marius

-- 
George L. Yermulnik
[YZ-RIPE]

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to