Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 sent an email, but immediately got a reply saying:

Final-Recipient: rfc822;
Action: failed
Status: 5.0.0 (permanent failure)
Diagnostic-Code: smtp; 5.1.2 - Bad destination host 'DNS Hard Error looking up (MX):  NXDomain' (delivery attempts: 0)

I was wondering

  1. what this error report means,
  2. where in the delivery route the error happened,
  3. who should be contacted to solve this issue and how to solve it?

Thanks and regards! I also appreciate if someone can explain a bit more about the mechanism behind the email delivery.

share|improve this question
up vote 3 down vote accepted

This is indicating that your local mail server cannot find the MX (Mail eXchange) DNS record for the destination domain (smtpint, This happens at your local mail server. You shuold contact the DNS administrator for the destination domain.

Have a look at the TCP/IP Guides information on SMTP for an explanation of how it works.

share|improve this answer
Thanks! By my "local mail server", I am using gmail, is my local mail server the server used by gmail? – Tim Apr 2 '11 at 15:58
More specifically, it looks like your email server is reporting that the recipient domain does not exist. – joeqwerty Apr 2 '11 at 16:13
@Tim: Yes, @joeqwerty: doesn't (MX) indicate it can't find the MX records rather than the A records ? – Iain Apr 2 '11 at 16:30
An NXDOMAIN is supposed to be returned when the domain cannot be found. I don't believe NXDOMAIN is a valid answer when only the MX of the domain can't be found. – joeqwerty Apr 2 '11 at 16:36
You'll probably want to perform an NSlookup on your mail server to (with "set type=mx") to see if it can see the record, then do it from another workstation, and finally do it against a public DNS server ("server") to find out if you're just having problems resolving the DNS record or if it doesn't exist at all. – Hyppy Apr 2 '11 at 17:23

The easiest way to solve or have explained this and other e-mail problems or e-mail fraud attempts contact your own service provider.

share|improve this answer
Aside from being essentially incomprehensible, your answer is also wrong. The accepted answer (with the positive score and the green check mark) is correct about what this error means. – HopelessN00b Oct 2 '12 at 7:02

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.