6 ms·
Out of curiosity though: why is it like this? Wouldn't it make a lot more sense to set an IP address instead of a hostname? Now the admin needs to keep track of
by xg15 6y ago
Out of curiosity though: why is it like this? Wouldn't it make a lot more sense to set an IP address instead of a hostname? Now the admin needs to keep track of an additional DNS entry (for the mail server) and the client has to make one additional request.
- topranks 6y agoIt’s been the way since way back in the 80s. Domain name is often the best way to go. Esp if different organisations are involved (like a mail hostel.)
- freeone3000 6y agoOnly A and AAAA records take an IP. Everything else is a hostname. This simplifies administration, as there's only one hostname->IP config point, so you have the flexibility to resolve the rest dynamically.
- JdeBP 6y agoIt's a good question. It did not have to be designed this way, and indeed there have existed for some decades now DNS content server softwares that hide this indirection from administrators as a convenience, and synthesize the intermediate domain names if necessary. For example, the back-end database for tinydns has "@" records in its source data files, and an administrator can (optionally) just enter: @example.net:192.0.2.0::10 tinydns synthesizes "mx.example.net." for the intermediate domain name. * http://jdebp.uk./Softwares/djbwares/guide/commands/tinydns-data.xml http://jdebp.uk./Softwares/djbwares/guide/commands/tinydns-d... That said, the SMTP Relay server needs to know that "mx.example.net." is one of its names, if it is a fallback server. One can envision a world where records in the DNS database map a (domain,service,transport) tuple directly to a set of (address,port,preference,weight) tuples, where that is what administrators consistently deal with for everything, where that is how the on-the-wire protocol actually works, and where SMTP Relay loop prevention works by comparing IP addresses; but SMTP doesn't work like that, the DNS did not start out like that, the DNS has gone through at least two iterations to even get to where it is now with SRV and MX records, and the DNS has grown through fitting new mechanisms against existing ones. One point about "mx.example.net.": If the intermediate domain names are in-bailiwick like that, and the MX response contains "glue", then it is not actually "one additional request".
- deleted 6y ago[deleted]
- teddyh 6y ago> That said, the SMTP Relay server needs to know that "mx.example.net." is one of its names, if it is a fallback server. It also would need to know its name in order to have SMTP over TLS to work (as required by DANE).
- murat124 6y ago> Out of curiosity though: why is it like this? In order to have a pointer to what you actually want to have. MX points to a hostname. This hostname can have many records including A, AAA, TXT, etc which are used by MTAs such as postfix and sendmail for delivery and verification. Also you'd have to make changes only in the hostname records which would affect all other records in the zone that point to it. Easier to maintain.
- mike_d 6y agoAn MX record is a mail authority delegation. The History Department at a major university could delegate mail to be handled by the schools IT department and need not be involved in the movement of a mail server from one IP to another. This decision was made in a time when running mail involved lots of external coordination and was best delegated to a single central group, whereas a simple web server could be spun up by a technical person within the History dept.
- manigandham 6y agoMX records are used to point to mail servers by name. A/CNAME records handle redirection and pointing a name to IPs. Having different DNS types helps simplify administration far more than the overhead of another entry.