DNS Records – Can You Reference a CNAME in an MX Record?

cname-recorddomain-name-systememailmx-record

We have several domains all pointing their MX records at mail.ourdomain.com, an internal mail server.

We are looking to outsource our email to a new supplier, who would like us to use mail.newsupplier.com; their mail server.

We'd rather not change all of the domain names to point to that MX record; several aren't in our control, and it would mean attempting to get many parties to change their MX records at the same time, which seems problematic.

Simpler would be to repoint mail.ourdomain.com at the IP for the new supplier. The problem is that our supplier isn't able to guarantee that IP will be fixed.

My question is, therefore: is changing mail.ourdomain.com to CNAME to mail.newsupplier.com an acceptable solution?

(For the record, only the email is moving, so we'd want to leave www.ourdomain.com and everythingelse.ourdomain.com unchanged.)

I've found several messages warning of the dangers of CNAMES in MX records, but I can't quite find someone talking about this particular setup, so any advice will be greatfully received.

Best Answer

According to RFC 1123, the MX record cannot point to a CNAME. If I were in your situation, I would setup mail.ourdomain.com as an A record pointing to the new suppliers IP address and then quickly work on changing all MX records over to the correct data. Then address why changing MX records is so difficult in your organization.

That being said, most mail servers will still submit mail to a CNAME; however, you can't be guaranteed of it.