News for hackers. Stuff that matters.
Re:Please do not put IP addresses into DNS MX records by eznzt on Sunday February 21, 2021 @01:22PM (#26215728)
Unless I'm missing something, the standard sounds pretty stupid
Re:Please do not put IP addresses into DNS MX records by tsimionescu on Sunday February 21, 2021 @04:58PM (#26217662)
You're missing something: IPv4 is not the only type of physical address supported by DNS. There is also IPv6, and historically there were others.

Instead of trying to parse the address and guess what protocol it might be, DNS tries to make that unambiguous: you ask it for the A or AAAA records for a domain name you are interested in, and you know for sure that you are getting an IPv4 or IPv6 address respectively.

The only clean alternative would have been to make an MXMXMXMX record type to hold a domain name OR an IPv6 address.

Re:Please do not put IP addresses into DNS MX records by JdeBP on Sunday February 21, 2021 @05:09PM (#26217758)
You are missing a lot, including the fact mentioned several times in this discussion that the data portion of an MX resource record simply is not an IP address. The data structure is a wire-format domain name (plus an integer). Even in BIND's "zone" file format, a human-format IP address isn't a fully qualified human-format domain name. But yes, the DNS RFCs are not as good as they could have been. However, you have reached that conclusion by the wrong route. (-: