François TOURDE a écrit :
Pascal Hambourg écrivait:
NON ! Il vaut mieux éviter les CNAME autant que possible, surtout en
relation avec des NS ou MX.
Pour le NS, c'est clair, mais pour les MX, chezmoiçamarche(r) ...
Ça peut aussi ne pas marcher. C'est pourquoi cette pratique est
déconseillée dans RFC 1912 - Common DNS Operational and Configuration
Errors :
Don't use CNAMEs in combination with RRs which point to other names
like MX, CNAME, PTR and NS. (PTR is an exception if you want to
implement classless in-addr delegation.) For example, this is
strongly discouraged:
podunk.xx. IN MX mailhost
mailhost IN CNAME mary
mary IN A 1.2.3.4
[RFC 1034] in section 3.6.2 says this should not be done, and [RFC
974] explicitly states that MX records shall not point to an alias
defined by a CNAME. This results in unnecessary indirection in
accessing the data, and DNS resolvers and servers need to work more
to get the answer. If you really want to do this, you can accomplish
the same thing by using a preprocessor such as m4 on your host files.