Fixing Exim error "the account or domain may not exist, they may be blacklisted"

Quags

Administrator
Staff member
If you have ever ran into the error

The mail server could not deliver mail to XXX The
account or domain may not exist, they may be blacklisted, or missing the
proper dns entries.

The first instinct is to think the domain name does not exist or does not have a MX record. Many times this is the case. A quick check with a dig will show the error

dig mx domain.com

For example

Code:
dig mx test.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.2 <<>> mx test.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65271
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;test.com.                      IN      MX

;; Query time: 19 msec
;; SERVER: 64.20.34.50#53(64.20.34.50)
;; WHEN: Thu Aug 16 11:35:49 2012
;; MSG SIZE  rcvd: 26

This has no mx record. Here is an example with one

Code:
dig mx is.cc

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.2 <<>> mx is.cc
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48908
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;is.cc.                         IN      MX

;; ANSWER SECTION:
is.cc.                  14400   IN      MX      0 mx.interserver.net.

;; Query time: 104 msec
;; SERVER: 64.20.34.50#53(64.20.34.50)
;; WHEN: Thu Aug 16 11:36:26 2012
;; MSG SIZE  rcvd: 57
If you checked and there is no MX record, nothing further can be done. That means the remote domain does not expect mail. Nothing you can do there. But lets say you get something else back like an IP address. Here is a remote mail server that came back with an IP address

Code:
dig mx bene-care.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.2 <<>> mx bene-care.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57894
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;bene-care.com.                 IN      MX

;; ANSWER SECTION:
bene-care.com.          900     IN      MX      10 97.107.162.211.

;; Query time: 538 msec
;; SERVER: 64.20.34.50#53(64.20.34.50)
;; WHEN: Thu Aug 16 11:33:47 2012
;; MSG SIZE  rcvd: 61
Whats the difference you say? The IP address is not a valid MX record. Now, some mail software will deliver to the above address but if properly configured and following the RFC for mail email will fail. Obviously your clients probably want mail delivered to the server even if the remote mail server is misconfigured.

To allow exim to deliver to a mail server on an IP using a misconfigured MX record add

Code:
allow_mx_to_ip = yes
to /etc/exim.conf
And then restart exim. On cpanel you can use the exim configuration editor to add this in.
 
Top