Re:Please do not put IP addresses into DNS MX records
by Natsu on Sunday February 21, 2021 @03:19PM
(#26216771)
I guess nowadays that should still be useful to give both an IPv4 and IPv6 address for the mail server?
Re:Please do not put IP addresses into DNS MX records
by aussiegeek on Sunday February 21, 2021 @08:40PM
(#26219678)
Yep, just have A and AAAA records for the hostname the MX points to
Re:Please do not put IP addresses into DNS MX records
by herpderperator on Sunday February 21, 2021 @08:44PM
(#26219706)
Why? You can just make mail.example.com resolve to two IPs: an IPv4 and IPv6 address. Nothing wrong with that.
Re:Please do not put IP addresses into DNS MX records
by remram on Monday February 22, 2021 @04:10PM
(#26230670)
Isn't that what Natsu said?
Re:Please do not put IP addresses into DNS MX records
by herpderperator on Monday February 22, 2021 @08:13PM
(#26232763)
No. If you read the top-level comment, it sounds like the response directly indicates that these days it would be useful to use the defunct multiple classes (IN vs CH) functionality to instead reference different IP types (v4 or v6) in today's Internet, hence "nowadays". That isn't needed because we can already mix v4 and v6 records within the IN class itself through A/AAAA records.
If I misunderstood the comment, then my bad.
Re:Please do not put IP addresses into DNS MX records
by Natsu on Tuesday February 23, 2021 @01:01AM
(#26234255)
I see, I haven't had to dig too deep into DNS so it wasn't obvious to me that those were separated like that. I guess, then, that it's only useful to allow us to someday upgrade to some post-TCP/IP world if there's ever a reason for that.
For the A records you can different classes of addresses. Nowadays we are using the "IN", but the spec also supports others like "CH" (Chaos) and "HS" (Hesiod).[2]
MX record points to mail.example.org (A-record). mail.example.org could then point to two different addresses in the different networks, using the different classes. Depending on what network the client is connected to, it can request specify the class in the query and get address on the correct network.
I guess they could have baked this in to the MX records as well, but that would have made it more complicated.
Disclaimer: Just googled this up.
[1] https://serverfault.com/questions/663112/why-cant-mx-records... [2] https://serverfault.com/questions/220775/what-does-the-in-me...