Link to home
Start Free TrialLog in
Avatar of mattbrice
mattbrice

asked on

email and dns

I am back again trying to solve an email/dns problem.  I run a mail server on my small lan ,and have a quasi-permanent connection to the internet.  This means that although my isp is supposed to be providing 24/7 uptime, their service has these strange 60-90 second blackouts every 15-20 minutes they cannot solve.

This affects me because when someone tries to check their email at the same time one of the blackouts are occuring, it causes the response to be really slow.  jlevie pointed out a way to cure the other problem I was having by suggesting I correctly maintain an /etc/hosts file.  But with the blackouts, my pop server has a delay because I think that it is trying to do a reverse lookup of itself.  Here is a sample tcpdump output. 192.168.1.3 is the machine running qmail.  192.168.1.20 is my machine checking for email. 209.161.160.19 is my isp's dns server.

20:14:41.731133 eth0 < 192.168.1.20.1363 > 192.168.1.3.pop3: . 1:1(0) ack 1 win 17520 (DF)
20:14:41.732146 eth0 > 192.168.1.3.15093 > 209.161.160.19.domain: 61116+ PTR? 3.1.168.192.in-addr.arpa. (42)
20:14:41.748817 eth0 < 209.161.160.19.domain > 192.168.1.3.15093: 61116 NXDomain 0/1/0 (104)

So my basic question is what entry, if any, can I place in my /etc/hosts file that will prevent the reverse lookup? (or give the correct response?) I have tried various combinations to little avail.  I would rather not set up a dns server on my lan.  I have only 12 nodes and the changes here are very infrequent at best.

MB
Avatar of jlevie
jlevie

Check /etc/nsswitch.conf and make sure that files occurs before dns. It should look like:

hosts:      files nisplus nis dns

The important bits are that files is listed before dns. It doesn't matter about nisplus or nis in this case.

Have you considered that the "blackouts" might be a local problem rather than at your ISP? Is the Linux box the Internet gateway or does something else do that (if so what?)? If it is the gateway what version of Linux is it running and what kind of Internet link do you have (cable modem, SDSL, dialup, T1, etc)?
Avatar of mattbrice

ASKER

The file /etc/nsswitch already has files ahead of dns.  Any other ideas with respect to /etc/hosts or other files?  What should  my hosts file look like given the information in my original comment?

As far as the blackouts are concerned, they are caused by my isp's system.  I don't use dsl, cable, or dial-up. Because of my location, the only service that I could get (other than a basic dial-up account) was their microwave wireless system. (Which is also very inexpensive) When it works, it is very quick. They have a lot of their wireless customers complaining about the same thing and are aware of the problem.  They just don't know of a solution.

Thanks for the help,

MB
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
 If you not be sure about the name resolves, do like:

1, run "linuxconf" by root, and find out the domain name server config, and make a right turn between the hosts and systemdns.

2, edit your /etc/hosts file, add a line like:
    192.168.1.123 emailerver.yourdomain.com
    ~~~~~~~~~~~~~
     192.168.1.123 is Your email server's IP.

3, check whether the system worked well:
   first, "ping" the domain name about your email server, If the IP address been given is correct, it's OK. Second, run "nslookup" and fill your email server's domain name "emailserver.yourdomain.com" after the prompt ">", get the result, if it also worked, That's OK.

Good Luck :)
I have tried the adding the ip of the email server, but it does not seem to make a difference.  I am running qmail + vpopmail.  I do not have the time right this moment to install the dns, but I will be thinking about it.  I have read that djbdns is a good choice, and also authored by the same man who wrote qmail.  

I really appreciate the comments so far.

MB
Thanks for all the help.  I decided to follow your advise and set up a local DNS server.  It turned out to be a fairly simple task.  I used djbdns and although I don't have a the features working, it has made checking email lightning fast without sacrificing browsing speed.  

MB
Cool...