Outgoing mail fails - I couldn't find a mail exchanger or IP

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Outgoing mail fails - I couldn't find a mail exchanger or IP

Unread post by coolemail »

We have CentOS with ASL and Plesk 10.2.0. A local hosted client is trying to send email to one particular remote (unhosted) domain which fails with:
Hi. This is the qmail-send program at plesk2.hostname.co.uk.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<joe.bloggs@remote-domain.co.uk>:
Sorry, I couldn't find a mail exchanger or IP address. (#5.4.4)
DNSStuff shows that this is being caused due to the remote domain's MX record being a CNAME and not an IP address:
Trying to connect to all mailservers:

smtp.cluster.switchmedia.co.uk. [ERROR: A CNAME appeared in the MX records; this is not valid. A CNAME appeared in the MX records; this is not valid (per RFCs 974 "Minor Special Issues" section, and 1034 section 3.6.2.
Mailservers are not required to send E-mail to smtp.cluster.switchmedia.co.uk.]
Does anyone know how we could force our server to accept sending to that domain even though it is not properly set up and bypass this particular check?
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Outgoing mail fails - I couldn't find a mail exchanger o

Unread post by faris »

If I remember correctly, by default Plesk (2.x to very recently) used to create CNAMEs for mail.domain.tld and then add an MX pointing to mail.domain.tld. They worked fine. It was just not a good idea and it was not RFC-compliant, but it worked.

I'm not sure why it isn't working here for you, but it is worth keeping in mind that it may be that it has nothing to do with CNAMEs.

I suggest that you do a "dig" or "nslookup" on your server for the MX record for that domain and see what happens. It might be as simple as a complete DNS lookup failure.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Outgoing mail fails - I couldn't find a mail exchanger o

Unread post by scott »

Or maybe its a local dns resolution problem? Do you get the right MX & domain? After that can you connect to that remote servers SMTP port? Maybe you're RBL'd or shunned
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: Outgoing mail fails - I couldn't find a mail exchanger o

Unread post by coolemail »

Thank you both for your input. I think we are resolving OK.
[plesk2.hostname.co.uk ~]# dig mx switchmedia.co.uk

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> mx switchmedia.co.uk
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63906
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 3, ADDITIONAL: 6

;; QUESTION SECTION:
;switchmedia.co.uk. IN MX

;; ANSWER SECTION:
switchmedia.co.uk. 86400 IN MX 20 b.mx.switchmedia.co.uk.
switchmedia.co.uk. 86400 IN MX 5 mailgate.switchmedia.co.uk.
switchmedia.co.uk. 86400 IN MX 20 a.mx.switchmedia.co.uk.

;; AUTHORITY SECTION:
switchmedia.co.uk. 1524 IN NS ns1.switchmedia.co.uk.
switchmedia.co.uk. 1524 IN NS ns2.switchmedia.co.uk.
switchmedia.co.uk. 1524 IN NS ns0.switchmedia.co.uk.

;; ADDITIONAL SECTION:
mailgate.switchmedia.co.uk. 86400 IN A 89.207.168.7
a.mx.switchmedia.co.uk. 86400 IN A 89.207.168.36
b.mx.switchmedia.co.uk. 86400 IN A 89.207.168.39
ns0.switchmedia.co.uk. 20295 IN A 89.207.168.2
ns1.switchmedia.co.uk. 20295 IN A 89.207.169.2
ns2.switchmedia.co.uk. 1524 IN A 89.207.169.2

;; Query time: 14 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jun 14 16:15:20 2011
;; MSG SIZE rcvd: 249

[plesk2.hostname.co.uk ~]# nslookup switchmedia.co.uk
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
Name: switchmedia.co.uk
Address: 89.207.168.29

[plesk2.hostname.co.uk ~]# nslookup mailgate.switchmedia.co.uk
Server: 127.0.0.1
Address: 127.0.0.1#53

Non-authoritative answer:
Name: mailgate.switchmedia.co.uk
Address: 89.207.168.7

[plesk2.hostname.co.uk ~]# host -r mailgate.switchmedia.co.uk
mailgate.switchmedia.co.uk has address 89.207.168.7
[plesk2.hostname.co.uk ~]# host -r 89.207.168.7
7.168.207.89.in-addr.arpa has no PTR record
[plesk2.hostname.co.uk ~]# host -r 89.207.168.29
29.168.207.89.in-addr.arpa has no PTR record
[plesk2.hostname.co.uk ~]#
I think it is a Plesk anomaly which does not send when their MX goes to a CNAME which apparently is not valid and they do what DNSStuff suggest by not sending. We have had this only once before and when the remote domain owner got their host company to make the change, we were then able to send. I was wondering if anybody can think of a way to bypass what Plesk is deciding to do.

Many thanks, as ever.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Outgoing mail fails - I couldn't find a mail exchanger o

Unread post by faris »

All those MX records are A records (unless I'm misreading). No CNAMEs.
And none of the MX records point to smtp.cluster.switchmedia.co.uk. There should be no reason for a mailserver to try to deliver there.

Please try again with dig @localhost to see if there's a difference.

dig @localhost mx switchmedia.co.uk

As far as I'm aware, Qmail has no problems sending an email to an MX record that points to a CNAME.

** However, when I do a dnsreport on that domain, I'm seeing a missing nameserver (ns2.switchmedia.co.uk). I think that's the real problem.

Was this domain ever hosted on your server by any chance?
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: Outgoing mail fails - I couldn't find a mail exchanger o

Unread post by coolemail »

Thanks for the input faris.

The email address that is failing is on on dmcadmin.co.uk. That is the MX which goes to the smtp.cluster:
[root@plesk3 ~]# dig @localhost mx dmcadmin.co.uk

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> @localhost mx dmcadmin.co.uk
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19768
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;dmcadmin.co.uk. IN MX

;; ANSWER SECTION:
dmcadmin.co.uk. 86400 IN MX 5 smtp.cluster.switchmedia.co.uk.

;; AUTHORITY SECTION:
dmcadmin.co.uk. 86400 IN NS ns1.switchmedia.co.uk.
dmcadmin.co.uk. 86400 IN NS ns0.switchmedia.co.uk.

;; Query time: 24 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Jun 16 10:07:05 2011
;; MSG SIZE rcvd: 109

[root@plesk3 ~]# host smtp.cluster.switchmedia.co.uk
smtp.cluster.switchmedia.co.uk is an alias for a.mx.switchmedia.com.
a.mx.switchmedia.com has address 89.207.168.36
[root@plesk3 ~]#
It was investigation of the domain switchmedia.co.uk that gave the output in the first post.

We have never hosted dmcadmin.co.uk or switchmedia.com.

If our client sends from the domain that we host, it fails. If he sends from his google mail it goes through. I think Plesk 10 chooses not to send when the MX record goes to a CNAME. The dnsstuff check we did was the mail test:
E-mail Tester results for xxxxxxx@dmcadmin.co.uk


Getting MX record for dmcadmin.co.uk (from local DNS server, may be cached)... Got it!

Host Preference IP(s) [Country]
smtp.cluster.switchmedia.co.uk. 5 89.207.168.36 [GB]




Step 1: Try connecting to the following mailserver:
[ERROR: A CNAME appeared in the MX records; this is not valid (per RFCs 974 "Minor Special Issues" section, and 1034 section 3.6.2.
Mailservers are not required to send E-mail to smtp.cluster.switchmedia.co.uk.]
CNAME(s) I found are: [smtp.cluster.switchmedia.co.uk. CNAME a.mx.switchmedia.com.] smtp.cluster.switchmedia.co.uk. - 89.207.168.36

Step 2: If still unsuccessful, queue the E-mail for later delivery.



Trying to connect to all mailservers:

smtp.cluster.switchmedia.co.uk. [ERROR: A CNAME appeared in the MX records; this is not valid. A CNAME appeared in the MX records; this is not valid (per RFCs 974 "Minor Special Issues" section, and 1034 section 3.6.2.
Mailservers are not required to send E-mail to smtp.cluster.switchmedia.co.uk.]
Sorry that my previous posts were not clear with the actual domain that goes via switchmedia. Can you help further?
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Outgoing mail fails - I couldn't find a mail exchanger o

Unread post by faris »

Hmm.. I see.

OK, well, I still don't know why the email won't be delivered. You may be right about plesk 10. In which case there's nothing you can do except set up a manual DNS record, which is something plesk is not set up to let you do.

I suppose you could set up the domain in plesk, put in correct dns records and switch off email (and don't set up hosting) for the domain, but I don't know if it would work.

Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: Outgoing mail fails - I couldn't find a mail exchanger o

Unread post by coolemail »

Thanks for the input faris. We have only had this twice and both since upgrade to Plesk 10 (such a big mistake!). The first time we pointed it out, the 3rd party was very grateful and made the changes to their own domain hosting. This is the second time. I might consider setting up the domain as you say if our client says it is so mission critical.
Post Reply