Why does RFC 2181 disallow MX record with a CNAME exchange?
According to RFC 2181 https://www.rfc-editor.org/rfc/rfc2181#section-10.3
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.
Why is this restriction in place?
I assume due to resolving overhead but is it really that costly nowadays?
From experience with an incorrect MX record that used a CNAME exchange no problems were experienced during the course of a couple years except for a couple mail relays that couldn't find the MX exchange.
Top Answer/Comment:
While the RFC is clear it’s about performance (and it's forbidden in SMTP RFC5321 too) whether you can ignore it and do it anyway also depends if you want to use MTA-STS and continue receiving email from Microsoft Office 365 (O365) tenants or not I suppose (ask me how I know 😅):
https://techcommunity.microsoft.com/discussions/exchange_general/clarifications-on-mta-sts-policy-with-cname-records/3929805
Why Microsoft take this stance (only for MTA-STS) I think is if your domain mycompany.co.uk had a bunch of MX records like to mx1.mycompany.co.uk and that itself is an alias to mx.thirdpartymailsolutions.co.uk and they get DNS compromised or go out of business and I buy the domain and/or they’re down your MX priority list and you forget it’s even there then anyone in control of that domain is in control of your inbound email.
Of course if mx.thirdpartymailsolutions.co.uk is an A record then you can still point to it.. it just makes the path slightly less convoluted than if MX points to mx1.mycompany.co.uk and that itself is a CNAME to some other off domain destination.
With ACME being in control of a domain is enough to get certs too.. so I can buy/compromise thirdpartymailsolutions.co.uk and make a cert and receive your email for mycompany.co.uk
These would be my guesses on why the change of heart when MTA-STS is concerned.
상단 광고의 [X] 버튼을 누르면 내용이 보입니다