Understanding How Exchange Handles Failed DNS Lookups

How does Exchange Server handle DNS lookups when the original lookup fails? How long will Exchange remember the failure before it tries again to query for the necessary name?

By default, Windows Server 2003 and Windows 2000 cache negative DNS responses for 15 minutes. Because Exchange Server uses the Windows DNS engine, it honors the set cache limit. Let's say you're trying to send mail to [email protected] When Exchange queues the message at your outbound SMTP server, that server tries to find the DNS MX record for contoso.com (assuming you're using direct DNS delivery and not forwarding to a smart host). If that query fails, the message remains in the outbound server's queues; when the SMTP service retries the query within that 15-minute cache period, the DNS service tells the SMTP service that the name isn't available, and so it marks the message for later delivery. When the contoso.com DNS server becomes available and the query succeeds, the message reaches its destination. However, this process can take some time because the SMTP server must wait for the cache to age out the negative response. On Windows 2003, you can decrease the cache interval for negative responses to as little as 1 second by using the dnscmd command while logged on with administrative privileges. For example, the command

dnscmd /config /maxnegativecachettl 1

will set the interval to 1 second. There doesn't seem to be a way to force Windows not to cache a negative response at all, but a 1-second delay is more than adequate for most needs.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.