1844035 Members
2782 Online
110226 Solutions
New Discussion

dns resolving timeouts

 
Ruben Cardenal
Frequent Advisor

dns resolving timeouts

Hi!

Well, this is a qmail & dns related question. I have qmail installed in one of my HP9000 servers. That server collects logs, etc, from other machines via e-mail. Later, through POP3, I read messages in the accont where they arrive. But there's a little problem (in fact, a timeout). As these machines are isolated from the internet, they do not use DNS. When I do this:

root@grecopr2:/# telnet localhost 110
Trying...
Connected to localhost.
Escape character is '^]'.
+OK <18155.1012994166@grecopr2>

Before the last line, there's a delay of 30 seconds, which is the time the dns gives a timeout because it can't resolve the machine name. After that, messages can be, of course, readed properly. As qmail is a daemon that does *NOT* read /etc/hosts, it's not a solution for me to put machine address machine IP in that file. I need another way for dns to resolve at least my local machine IP for POP3 logins to be done quickly. I hope I have explained myself well :)

TIA
11 REPLIES 11
Tom Geudens
Honored Contributor

Re: dns resolving timeouts

Hi,
I'm not quite clear as to why qmail would not use /etc/hosts. Doesn't that depend on what is in /etc/nsswitch.conf ? If there's a line in there like ...
hosts: files
... why wouldn't qmail then use /etc/hosts ?

Maybe you could post your /etc/nsswitch.conf file ?

Regards,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Ruben Cardenal
Frequent Advisor

Re: dns resolving timeouts

The /etc/nsswitch.conf has the correct entries, such as
hosts: files

qmail daemon tries to do dns inquiries from a dns server, and doesn't take care of /etc/hosts file.
harry d brown jr
Honored Contributor

Re: dns resolving timeouts

What does

/etc/resolv.conf


say?


live free or die
harry
Live Free or Die
marko asplund
Frequent Advisor

Re: dns resolving timeouts

i tried browsing through the source of the qmail (v1.03) DNS query routines and to me it seems like they use the resolver library underneath. are you sure you're not having a resolver library configuration problem?
Ruben Cardenal
Frequent Advisor

Re: dns resolving timeouts

Harry: that file doesn't exist in these machines.

Marko: I's not that kind of problem...
Tom Geudens
Honored Contributor

Re: dns resolving timeouts

Hi,
I had a look through http://www.lifewithqmail.org/
and came up with the smtproutes parameter, which (according to the document) should be used when there's no dns available.

You probably looked at this already ... but ...
Hope this helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Ruben Cardenal
Frequent Advisor

Re: dns resolving timeouts

Tom: smtproutes is for SMTP'ing purposes, not POP3 related :(
harry d brown jr
Honored Contributor

Re: dns resolving timeouts

Is grecopr2 your localhost? What does /etc/hosts have for localhost?

live free or die
harry
Live Free or Die
Ruben Cardenal
Frequent Advisor

Re: dns resolving timeouts

root@grecopr2:/# nslookup grecopr2
Using /etc/hosts on: grecopr2

looking up FILES
Name: grecopr2
Address: 10.15.7.22
Aliases: grecopr2.

root@grecopr2:/# nslookup 10.5.7.22
Using /etc/hosts on: grecopr2

looking up FILES
*** No hostname information is available for "10.5.7.22"
root@grecopr2:/#

Yes, grecopr2 is the name of the machine.

The content of /etc/hosts is:


10.15.7.22 grecopr2 grecopr2.
10.15.7.23 grecods
10.15.7.21 grecopr1
10.15.7.27 tareadb
10.15.7.25 tareaap1
10.15.7.26 tareaap2
10.15.7.24 tareads
10.15.7.28 pkgsap
10.15.7.29 grecopkg
135.10.0.6 greco01
127.0.0.1 localhost loopback localhost.grecopr2.grecopr2
10.15.6.1 sapdesa
135.10.0.2 EH02

But I insist: qmail doesn't use /etc/hosts for dns query
Rita C Workman
Honored Contributor

Re: dns resolving timeouts

Not sure if this will apply..but what the hey...

I had a problem here with mail. Our DNS server is outside our lan, the relay is an NT server using GroupWise,so we could mail from our UNIX boxes through GroupWise ok.., but for mail to stay here (to me@here.com or co-worker@here.com) it couldn't resolve because once it went out the door, the State's DNS server didn't resolve 'me@here.com'. So I needed a way to send mail in & out...and also send mail within our lan. Confused yet. In other words I needed a way to stop at the door before the mail hit the DNS server and look back inside before resolving out of house...See what I mean...
What we did was to resolve my problem within our PIX firewall using an Alias command to resolve the IP:
ALIAS 'private host ip#' 'public host ip#' 255.255.255.255

where:
'private host ip#' = The private ip address configured on the
mail server. = XXX.XXX.XXX.XXX

'public host ip#' = The public ip address as configured in the
DNS for the mail server. =

255.255.255.255 = Full mask specifying a single host. = as is.
====
Be sure to issue a 'CLEAR XLATE' command on the PIX after adding the
ALIAS command... otherwise it won't take effect.
==========================
I can't take credit for the above resolution (and it worked)..a great network person & I worked on this to get it resolved.

Don't know if this will help, but it's a thought...
Rgrds,
Rita

Ruben Cardenal
Frequent Advisor

Re: dns resolving timeouts

Good morning,

Rita, yes, that's a solution... if there were a firewall and a dns server here. What I'd need is a way of having the only IP/Hostname of this machine being resolved without installing a DNS server here :(