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

Top Page
Delete this message
Reply to this message
Author: Marcin Mirosław
Date:  
To: exim users
Subject: Re: [exim] Exim can't resolve hostname of database when second email is sended in one TCP connection
W dniu 13.11.2013 19:51, Phil Pennock pisze:
> On 2013-11-13 at 16:43 +0100, Marcin Mirosław wrote:
>>> or I add "pgsql" to /etc/hosts then problem disappears.
>>> It looks like "search" option isn't applied when exim tries translate
>>> hostname to address.
>
>> I just noticed that similar problem appears if I use ${lookup pgsql{}}
>> in transport. In such situation I have problem with resolving hostname
>> of database if I don't use FQDN in definition of pgsql server. Again,
>> "search" option from resolv.conf seems to be ignored.
>
> Correct; Exim is very careful to disable search by default, so that
> hosts supplied in routing rules don't unexpectedly go to some place
> else. The only exceptions (which come to mind) are dns_search_parents
> on an SMTP transport and search_parents on a dnslookup router.
>
> Sorry, you need to specify remote services used by Exim in a way which
> doesn't involve probing DNS repeatedly; this normally isn't an issue,
> since each DNS request adds latency; remember that Exim forks and execs
> a lot, so there's going to be a fresh request to resolve each time.
>
> If you can use a local socket for pgsql, with peer auth, then that will
> be fastest and cleanest. If you need to specify a remote hostname,
> specify the fully-qualified name so that the lookups can complete
> quickly.
>
> If there's a compelling reason to support short names, please let us
> know.
>
> This appears to be under-documented in The Exim Specification; can you
> let us know where you would expect to see warnings, so we can add some?


Hi!
Thank you Phil for anwser for my emails.

I don't have strong arguments to argue for add support short names. It's
rather matter of habit, usually most soft supports it.
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.
(Also in definition of spamd connection even short names can't be used.
Documentation doesn't mention if hostnames can be used but in examples
there are only numerical addresses. In definition of clamd connection
hostnames can be used.).
If something works in many places and doesn't work in a few I'm thinking
that "not works" state is incorrect:)

I'll try to create my proposition of changes in doc.
Thanks,
Marcin