Today I face a strange problem with e-mail won’t be deliver, to a client . I have tested from yahoo, gmail and other service and everything was fine however one client from gmx was complain that he can’t send e-mail to that account
A message that you sent could not be delivered to one or more of
its recipients. This is a permanent error. The following address
failed:
“user@domain.com”:
domain has no valid mail exchangers
So, first impresion was to check if domain.com have a mx . So a short
dig mx domain.com output a
DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 mail.domain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
;domain.com. IN MX
;; ANSWER SECTION:
domain.com. 2011 IN MX 10 mail.domain.com.
So it appear that is there.
But the problem was when I query to see who is the mail.domain.com
dig mail.domain.com
DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 mail.domain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
;mail.domain.com. IN A
;; ANSWER SECTION:
mail.domain.com. 1937 IN CNAME domain.com.
domain.com. 1937 IN A xxx.xxx.xxx.xx
;; AUTHORITY SECTION:
domain.com. 1932 IN NS dns1.domain.com.
domain.com. 1932 IN NS dns2.domain.com.
;; Query time: 3 msec
So we see that mail.domain.com is a CNAME, it appear that is against rfc , and need to be A zone and not alias/CNAME.
So the solution is to modify mail.domain.com to be A xxx.xxx.xxx.xxx
Regards