1

I just installed bind on my qmail server with the goal of avoiding DNS queries for domains that the server already ask a few seconds/minutes ago, as caching server. So now, resolv.conf has 127.0.0.1 as nameserver, and after a while the new local-bind is answering almost every query.

However, I can see (using tcpdump) that the server is still asking for a lot of domain to my primary and secondary DNS servers (Using forward), and just realized this:

DNS query : MX? hotmeil.com

DNS answer: ServFail

Well, as you can see I'm receiving a NXDOMAIN (ServFail)

The question, is it possible to tell my local-DNS to not retry for NXDOMAIN received?, at least remember the fail for a while, and thus avoiding all these useless queries?

Thanks guys!.

2
  • Sorry, I mean that I'm receiving a NOERROR response, not NXDOMAIN.
    – CarlosH
    Jul 23, 2010 at 0:01
  • You can edit your question to change the context Jul 23, 2010 at 0:02

1 Answer 1

2

A NOERROR (aka NODATA) response means that the domain exists, but that the specific resource record type requested (MX?) does not.

Your DNS server should wait for the "minttl" time specified in that response before asking again. This also applies to the SERVFAIL response, if seen. See RFC 2308.

Note though that any such TTL is advisory. If your name server runs out of cache it's perfectly free to forget that a record doesn't exist and query for it again when asked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .