Re: [Exim] Preventing exim from querying dns for localhost

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Steffen Evers
CC: exim-users, debian-testing
Subject: Re: [Exim] Preventing exim from querying dns for localhost
On Fri, 9 Nov 2001, Steffen Evers wrote:

> I have encountered exactly the same thing.
> Everytime exim is called it is doing this. You can run
>
> 'exim -bp' (give current queue).
>
> Even with an empty queue it is the same thing. I was able to stop this
> by setting option 'primary_hostname=MyMachine' in the exim.conf file,
> but now all remote messages are no longer delivered. See my mails
> earlier on this list.


I have had a thought. If you do NOT set primary_hostname, Exim will call
the uname() function to find the name. If it then finds a name that is
not fully qualified (that is, if there is no '.' in the name), Exim will
call gethostbyname() in order to find the fully qualified name. (This is
all documented under 'primary_hostname'). The gethostbyname() may be
what is doing the DNS lookup. When you set primary_hostname explicitly,
it won't do this.

Exim really expects to operate with a fully qualified host name, because
hosts on the Internet are supposed to have such names.

> This could as well be an issue of libc6 resolver. Can an exim developer
> comment on this perhaps?


I'm afraid I'm the only Exim developer, so you'll have to make do with
my comments...


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.