Re: [exim] Exim can't resolve hostname of database when seco…

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Marcin Mirosław
CC: exim users
Subject: Re: [exim] Exim can't resolve hostname of database when second email is sended in one TCP connection
On 2013-11-14 at 13:31 +0100, Marcin Mirosław wrote:
> BI'd like to ask to make Exim's behavior more coherent in this matter.
> In most places where I'm using ${lookup pgsql{}} short names in
> definition of database connection just works. I know about to cases when
> it doesn't work:
> - transports
> - whem I send second email in one tcp connection (one pass:
> -- ehlo,mail from, rcpt to, data - it works
> in second pass it stops to works.


Oh, right. We don't call `dns_init()` at program start, only when we're
about to do something DNS-related for the purpose of mail-routing.
That's ... unfortunate.

I think you're using a DNSxL for checks; I think this because one place
we do call `dns_init()` is from `verify_check_dnsbl()`, so after a DNS
list check, the state is changed.

I'm tempted to just call dns_init() near the start of the program, to
force state to be more consistent for external lookups, because this
sort of ill-defined state is awkward to debug.

-Phil