Help with email/mx configuration

#1
What can I do to diagnose email send/receive failures? For my domain, whitepeacockyoga.com, emails sent do not arrive at their destination nor do they bounce back. Email sent to the domain does not arrive. I can log into the mail server, mail.whitepeacockyoga.com, and am curious where to look next. This is one of several accounts on my VPS. Any suggestions?
 

KH-Jonathan

Director of Managed Services
Staff member
#2
Garrett,

The best thing you can do is reference the Exim log file in /var/log/exim_mainlog. This will tell you everyting you need to know about an email up to the point that it left your server, which in this case it may not have.

Support will be more than happy to assist you with this if you open a ticket, or if you want to work through things here I can to give you some shell commands to start with.

Code:
grep whitepeacockyoga.com /var/log/exim_mainlog
The above command will get us started. There shouldn't be an sensitive information in the return from this command aside from email addresses and subjects, so a suport ticket may still be your best bet if this is anything at all private you're emailing about.
 
#3
The temporarily rejected RCPT...Could not complete sender verify lines seem interesting:

Code:
2014-02-20 16:26:24 1WGb8S-0003WS-O0 <= root@host.blacktowerhosting.com U=root P=local S=1109 T="New account on host.blacktowerhosting.com (whitepeacockyoga.com)" for garrett.hunter@blacktower.com
2014-02-20 16:55:08 H=mail-ve0-f181.google.com [209.85.128.181]:60410 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <rretreats@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 16:55:08 H=mail-ve0-f174.google.com [209.85.128.174]:57428 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <admin@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 16:55:08 H=mail-ve0-f179.google.com [209.85.128.179]:59908 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <info@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 16:55:08 H=mail-ve0-f174.google.com [209.85.128.174]:39214 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <audrey@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:00:10 H=mail-vc0-f173.google.com [209.85.220.173]:44485 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <admin@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:00:16 1WGbfE-00043a-9G <= info@whitepeacockyoga.com H=localhost (67.222.16.69) [127.0.0.1]:55209 P=esmtpa A=dovecot_login:info@whitepeacockyoga.com S=530 id=e0f06d7cb7ae01cde5d9403dadeaf9e4@whitepeacockyoga.com T="test" for garrett.hunter@blacktower.com
2014-02-20 17:00:16 1WGbfE-00043a-9G SMTP connection outbound 1392933616 1WGbfE-00043a-9G whitepeacockyoga.com garrett.hunter@blacktower.com
2014-02-20 17:00:25 H=mail-vc0-f171.google.com [209.85.220.171]:52306 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <rretreats@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:00:53 H=mail-vc0-f174.google.com [209.85.220.174]:63895 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <info@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:01:44 H=mail-ve0-f171.google.com [209.85.128.171]:65184 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <audrey@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:07:54 1WGbmc-00049i-Bl <= info@whitepeacockyoga.com H=localhost (67.222.16.69) [127.0.0.1]:33092 P=esmtpa A=dovecot_login:info@whitepeacockyoga.com S=618 id=95c6aa4d9d7bc61725aa979d2bf89064@whitepeacockyoga.com T="test" for audrey@whitepeacockyoga.com
2014-02-20 17:07:54 1WGbmc-00049i-Bl => audrey <audrey@whitepeacockyoga.com> R=virtual_user T=virtual_userdelivery
2014-02-20 17:09:51 1WGboV-0004DR-Ql <= audrey@whitepeacockyoga.com H=localhost (67.222.16.69) [127.0.0.1]:34436 P=esmtpa A=dovecot_login:audrey@whitepeacockyoga.com S=614 id=9c66335157a313d9f86e9a15d385bb12@whitepeacockyoga.com T="test" for garrett@blacktower.com
2014-02-20 17:09:51 1WGboV-0004DR-Ql SMTP connection outbound 1392934191 1WGboV-0004DR-Ql whitepeacockyoga.com garrett@blacktower.com
2014-02-20 17:18:55 H=mail-ve0-f171.google.com [209.85.128.171]:53313 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <rretreats@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:23:05 H=mail-vc0-f181.google.com [209.85.220.181]:46472 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <audrey@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:24:47 H=mail-vc0-f181.google.com [209.85.220.181]:58699 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <admin@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:26:43 H=mail-vc0-f174.google.com [209.85.220.174]:59130 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <info@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:27:31 1WGc5b-0004Mk-C2 <= audrey@whitepeacockyoga.com H=(loganfive) [76.91.31.104]:61741 P=esmtpsa X=TLSv1:AES128-SHA:128 A=dovecot_login:audrey@whitepeacockyoga.com S=679 T="Microsoft Outlook Test Message" for audrey@whitepeacockyoga.com
2014-02-20 17:27:31 1WGc5b-0004Mk-C2 => audrey <audrey@whitepeacockyoga.com> R=virtual_user T=virtual_userdelivery
2014-02-20 17:29:09 1WGc7B-0004Oc-F4 <= audrey@whitepeacockyoga.com H=(loganfive) [76.91.31.104]:61799 P=esmtpsa X=TLSv1:AES128-SHA:128 A=dovecot_login:audrey@whitepeacockyoga.com S=2687 id=007301cf2e8b$2f3f4080$8dbdc180$@whitepeacockyoga.com T="test" for garrett.hunter@blacktower.com
2014-02-20 17:29:09 1WGc7B-0004Oc-F4 SMTP connection outbound 1392935349 1WGc7B-0004Oc-F4 whitepeacockyoga.com garrett.hunter@blacktower.com
2014-02-20 17:33:59 dovecot_login authenticator failed for (loganfive) [76.91.31.104]:61916: 535 Incorrect authentication data (set_id=audrey@whitepeacockyoga.com)
2014-02-20 17:34:08 dovecot_login authenticator failed for (loganfive) [76.91.31.104]:61920: 535 Incorrect authentication data (set_id=audrey@whitepeacockyoga.com)
2014-02-20 17:34:48 1WGcCe-0004Rr-HG <= audreysarquilla@gmail.com H=mail-pa0-f45.google.com [209.85.220.45]:54463 P=esmtps X=TLSv1:RC4-SHA:128 S=4751 id=CF2BC298.16DD1%audreysarquilla@gmail.com T="Re: YTT post" for audrey@whitepeacockyoga.com
2014-02-20 17:34:48 1WGcCe-0004Rr-HG => audrey <audrey@whitepeacockyoga.com> R=virtual_user T=virtual_userdelivery
2014-02-20 17:37:53 1WGcFc-0004St-SN <= audrey@whitepeacockyoga.com H=(loganfive) [76.91.31.104]:61977 P=esmtpa A=dovecot_login:audrey@whitepeacockyoga.com S=626 T="Microsoft Outlook Test Message" for audrey@whitepeacockyoga.com
2014-02-20 17:37:53 1WGcFc-0004St-SN => audrey <audrey@whitepeacockyoga.com> R=virtual_user T=virtual_userdelivery
2014-02-20 17:39:38 1WGcHK-0004Tu-PX <= garrettehunter@gmail.com H=mail-pd0-f178.google.com [209.85.192.178]:61795 P=esmtps X=TLSv1:RC4-SHA:128 S=3892 id=007801cf2e8c$a57178d0$f0546a70$@gmail.com T="TEST" for audrey@whitepeacockyoga.com
2014-02-20 17:39:38 1WGcHK-0004Tu-PX => audrey <audrey@whitepeacockyoga.com> R=virtual_user T=virtual_userdelivery
2014-02-20 17:50:12 H=mail-vc0-f178.google.com [209.85.220.178]:45505 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <info@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:52:30 H=mail-vc0-f181.google.com [209.85.220.181]:50624 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <rretreats@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:56:24 H=mail-vc0-f181.google.com [209.85.220.181]:46906 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <admin@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 17:57:28 H=mail-ve0-f182.google.com [209.85.128.182]:38933 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <audrey@whitepeacockyoga.com>: Could not complete sender verify
2014-02-20 18:44:50 H=mail-ve0-f172.google.com [209.85.128.172]:62952 F=<garrett.hunter@blacktower.com> temporarily rejected RCPT <audrey@whitepeacockyoga.com>: Could not complete sender verify
 

KH-Jonathan

Director of Managed Services
Staff member
#4
Code:
2014-02-20 17:09:51 1WGboV-0004DR-Ql <= audrey@whitepeacockyoga.com H=localhost (67.222.16.69) [127.0.0.1]:34436 P=esmtpa A=dovecot_login:audrey@whitepeacockyoga.com S=614 id=9c66335157a313d9f86e9a15d385bb12@whitepeacockyoga.com T="test" for garrett@blacktower.com
Based on the above line we can see mail is attempting to be sent from audrey@whitepeacockyoga.com to garrett@blacktower.com. Without have a few more logs my below thoughts are theoretical as I don't have the logs to back them up, but some basic DNS checks almost confirm this is the case.

I can see that your domain "blacktower.com" is using Google Apps for email hosting.

Code:
 dig mx blacktower.com +short
10 ASPMX.L.GOOGLE.com.
20 ALT1.ASPMX.L.GOOGLE.com.
40 aspmx2.googlemail.com.
30 alt2.ASPMX.L.GOOGLE.com.
50 aspmx3.googlemail.com.
70 aspmx5.googlemail.com.
60 aspmx4.googlemail.com.
Based on this, it means your server should be contact Google servers to attempt to deliver the mail.

My theory here is that the domain "blacktower.com" is setup on your server in /etc/remotedomains as it should be, so when attempting delivery to it your server is going to check the MX records for the domain - here's where our problem starts.

Since blacktower.com is also hosted on your server, it's going to check the DNS record that exists for it on your server. Hopefully you still follow me here.

Code:
dig ns blacktower.com +short
dns3.name-services.com.
dns4.name-services.com.
dns2.name-services.com.
dns5.name-services.com.
dns1.name-services.com.
Code:
dig a +short dns3.name-services.com
98.124.193.1
These two DNS lookups tell us that DNS for the domain is NOT managed by your server, thus it's very likely the the local DNS zone on your server for "blacktower.com" is out of date.

My guess is it's still got the cPanel defaults to direct MX back to the local server, at which point Exim is confused because you've already told it that mail should go outbound, but it's getting the mail coming back inbound thus it can't route it.

If you can run the following command I can confirm this is the case:

Code:
grep 1WGboV-0004DR-Ql /var/log/exim_mainlog
I'm assuming it's going to return something about a loop in MX records or something.
 
#6
Ah yes, you are absolutely correct. dig returns "0 blacktower.com." and not the gapp MX servers. I have been managing my DNS entries at my registrar and do have WHM set to Remote. There is also an MX entry pointing to blacktower.comin the local DNS file

Code:
2014-02-20 17:09:51 1WGboV-0004DR-Ql <= audrey@whitepeacockyoga.com H=localhost (67.222.16.69) [127.0.0.1]:34436 P=esmtpa A=dovecot_login:audrey@whitepeacockyoga.com S=614 id=9c66335157a313d9f86e9a15d385bb12@whitepeacockyoga.com T="test" for garrett@blacktower.com
2014-02-20 17:09:51 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1WGboV-0004DR-Ql
2014-02-20 17:09:51 1WGboV-0004DR-Ql SMTP connection outbound 1392934191 1WGboV-0004DR-Ql whitepeacockyoga.com garrett@blacktower.com
2014-02-20 17:09:51 1WGboV-0004DR-Ql lowest numbered MX record points to local host: blacktower.com
2014-02-20 17:09:51 1WGboV-0004DR-Ql == garrett@blacktower.com R=dkim_lookuphost defer (-1): lowest numbered MX record points to local host
2014-02-20 17:09:51 1WGboV-0004DR-Ql Frozen
2014-02-20 17:28:01 1WGboV-0004DR-Ql Message is frozen
2014-02-20 18:28:02 1WGboV-0004DR-Ql Message is frozen
2014-02-20 19:28:02 1WGboV-0004DR-Ql Message is frozen
2014-02-20 19:28:28 1WGboV-0004DR-Ql Message is frozen
2014-02-20 19:29:28 1WGboV-0004DR-Ql Message is frozen
2014-02-20 19:56:10 1WGboV-0004DR-Ql Message is frozen
2014-02-20 20:43:28 1WGboV-0004DR-Ql Message is frozen
I've been managing my DNS zones at my registrar. Do I need to replicate the zone on the local server or would it make management simpler to us the VPS name servers so that I have only one zone to manage?
 

KH-Jonathan

Director of Managed Services
Staff member
#7
Glad I could help :)

It will be much easier to just use the DNS server on the VPS as it will prevent oddities like this.

Just match the local zone file to what you have now at your registrar, then flip the domain to use the nameservers which point to your VPS and you'll be all set.
 
Top