coredns: CNAME and other data: cannot serve MX entry for domain
I recently faced the issue that I am unable to set the MX record for the domain xyz.ab, but was able to do it for a subdomain sub.xyz.ab
I tried to set the MX record in many different ways:
@ IN SOA ns1.example.org example.example.org. (
2017091601 ; Serial
28800 ; Refresh
7200 ; Retry
864000 ; Expire
86400 ) ; Min TTl
; Nameserver Information
IN NS ns1.example.org.
IN NS ns2.example.org.
; MX
IN MX 10 mail.example.org.
I also tried to set it like this:
example.org. IN MX 10 mail.example.org.
@ IN MX 10 mail.example.org.
I think this may be caused by this check (I’m not sure, I just checked a few issues related to MX on here) #531
I’m using the ‘file’ plugin
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (11 by maintainers)
Alright! Thanks for creating it in the first place 😃
Ok thank you! So I actually managed to return a static valid MX response without leaking the CNAME! It actually only required 5 lines of code to catch it.
You did good code! Easy to read
There is no actual dropping, it’s keeping track of seeing the CNAME, plugin/file/lookup.go#L155 looks like a good starting place.