Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server running Debian etch. It runs [qmail] and sends mail. Mail server works correct but the strange thing is from server itself it can't resolve hostnames. I can use nslookup and dig correctly.

ping: unknown host


; <<>> DiG 9.2.4 <<>>
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64443
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 4, ADDITIONAL: 4

;                    IN      A

;; ANSWER SECTION:             300     IN      A             300     IN      A             300     IN      A             300     IN      A             300     IN      A             300     IN      A

;; AUTHORITY SECTION:             134830  IN      NS             134830  IN      NS             134830  IN      NS             134830  IN      NS

;; ADDITIONAL SECTION:         105732  IN      A         105732  IN      A         105732  IN      A         105732  IN      A

;; Query time: 172 msec
;; WHEN: Sun Dec 20 00:39:35 2009
;; MSG SIZE  rcvd: 260

There is a point that i'm suspicious of is there is a package that was installed not used by another application called [resolvconf]. And is creates a symlink to original resolv.conf file.
My iptables list is empty.

share|improve this question

Your /etc/nsswitch.conf file should contain a like like this, to enable dns lookups.

hosts:       files dns

Dig is a DNS utility so it checks DNS. qmail might also be ignoring nsswitch.conf. Most other programs that use standard DNS calls in C library honor it. If yours dows not contain "dns" in it, it is pretty normal that DNS lookups don't work for most things.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.