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 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!.

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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