[Exim] Preventing exim from querying dns for localhost

Top Page
Delete this message
Reply to this message
Author: Gareth Clay
Date:  
To: exim-users
Subject: [Exim] Preventing exim from querying dns for localhost
Hi there,

I'm new to the list, but I've searched the archives for an answer to this
question but I didn't find one. My problem is this:

My machine is on a private network which uses the 192.168.*.* address
space. It has the hostname "willow.tachbrook.net" (this is just a nonsense
hostname). My ethernet IP address is 192.168.0.1 (static). I'm connecting
to the internet from this machine using PPP, and I'm assigned a dynamic IP
address for that interface. Just to confuse things, I'm running diald too
(so that other people on my home network can share my internet connection
through masquerading), which installs a tap0 interface with the IP address
10.0.0.2. When my ppp0 interface comes up, 10.0.0.2 is swapped for
whatever IP I'm dynamically assigned.

I'm getting confused just writing this ;)

Ok - here's the problem. When I boot up, exim tries to do a DNS lookup for
willow.tachbrook.net. This name is in my /etc/hosts file - so you would
think that exim would be able to get the IP address for
willow.tachbrook.net from there. However, this doesn't happen and exim
keeps trying to reach my ISP's DNS server, which requires an internet
connection. So, diald brings up my ppp0 interface as it should and exim
tries to query my ISP's DNS servers. Obviously it gets no reply - because
willow.tachbrook.net is only meant to be a private hostname for use on my
private network, so it gives up and the ppp connection drops.

Give it a few minutes, and exim tries again... connection comes up... goes
down... up, down... you get the idea.

Okay - that's my problem. I'm not knocking exim at all because it is a
quality piece of software and has served me admirably for all my time
before I installed diald. However, surely there must be an option
somewhere to prevent this aggressive DNS checking which is causing my
dial-up connection to bounce up and down every few minutes. I've
searched the man page and the docs on the website and haven't found
anything that looks like it might hold the answer, but I'm not the most
experienced MTA user and I could have easily missed something. Any
suggestions would be most welcome! :)

Thanks for your advice,
Gareth