Emails not being delivered to server from certain mail servers: "domain has no valid mail exchangers"

9,480

Assuming that's your real domain (for which, many thanks), you have a problem with your MX record:

[me@lory ~]$ dig mx fish-thecompany.com
[...]
;; ANSWER SECTION:
fish-thecompany.com.    86313   IN      MX      20 mail.fish-thecompany.com.
[me@lory ~]$ dig mail.fish-thecompany.com
[...]
;; ANSWER SECTION:
mail.fish-thecompany.com. 86300 IN      CNAME   fish-thecompany.com.
fish-thecompany.com.    86300   IN      A       109.228.0.95

But RFC2181 is very clear on the subject:

10.3. MX and NS records

The domain name used as the value of a NS resource record, or part of the value of a MX resource record must not be an alias. Not only is the specification clear on this point, but using an alias in either of these positions neither works as well as might be hoped, nor well fulfills the ambition that may have led to this approach. This domain name must have as its value one or more address records. Currently those will be A records, however in the future other record types giving addressing information may be acceptable. It can also have other RRs, but never a CNAME RR.

My guess is that some of your senders are using mail servers that are intolerant of violations of this particular RFC; as far as their servers are concerned, you really don't have any valid mail exchangers. Fix that, make your MX-referenced host an A record, and this may well improve.

Share:
9,480
John Reid
Author by

John Reid

I'm a developer who loves to tinker with different things. Working predominantly in PHP. Naturally HTML5 and Javascript follow. Playing with Windows and Linux desktops and servers. Podcasting, blogging and mucking about on the web is a full-time sideline.

Updated on September 18, 2022

Comments

  • John Reid
    John Reid over 1 year

    I'm having trouble with a server that I administer.

    I've been told that a number of emails aren't coming through. These are consistently from certain people. Here's the bounce error that they receive:

    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address failed:

    "[email protected]": domain has no valid mail exchangers

    I don't know how to approach this. Obviously I have mail exchangers as we can send and receive email (usually) without a problem.

    Is there anything I can do on our end or do I need to should I contact the postmaster for the domain that can't find the mail exchanger?

  • John Reid
    John Reid almost 10 years
    Thanks for pointing that one out. I'll switch it to an A record and see how it plays out.
  • Deer Hunter
    Deer Hunter almost 10 years
    This comment could be turned into a real answer with a bit more effort.
  • John Reid
    John Reid over 9 years
    I do thanks, it just took a while to thoroughly test that this was the right answer. I've now set it as the answer I appreciate the nudge though ;)
  • MadHatter
    MadHatter over 9 years
    Thanks for taking it so well - and remembering to come back and cross the t, as it were. Testing is always good!