assume I have a domain with the following RRs:
domain.com. IN A 184.108.40.206 domain.com. IN MX mail.domain.com. 10 * IN MX othermail.domain.com. 10 * IN CNAME domain.com. mail IN A 220.127.116.11
I hoped this would allow me to server web pages and receive mail on any subdomain of domain.com but when I test it:
~# dig blah.domain.com MX ; <<>> DiG 9.4.3-P1 <<>> blah.domain.com MX ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12815 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 <..snip..> ;; ANSWER SECTION: blah.domain.com. 84770 IN CNAME domain.com. domain.com. 83445 IN MX 10 mail.domain.com.
I would expect to get an answer section like so:
;; ANSWER SECTION: blah.domain.com. 84770 IN MX 10 othermail.domain.com.
But it seems that I get the CNAME wildcard record instead of the MX.
From reading various things I found online it seems to me that this behaviour is by design (however braindead it may be).
Now my question is if it is possible in any way to have a configuration like this returning different anserws based on the record type?