Help with email/mx configuration

Discussion in 'Linux VPS/Dedicated - cPanel' started by Garrett, Feb 20, 2014.

  1. Garrett

    Garrett New Member

    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?
     
  2. KH-Jonathan

    KH-Jonathan Director of Managed Services Staff Member

    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.
     
    Garrett likes this.
  3. Garrett

    Garrett New Member

    The temporarily rejected RCPT...Could not complete sender verify lines seem interesting:

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

    KH-Jonathan Director of Managed Services Staff Member

    Code:
    2014-02-20 17:09:51 1WGboV-0004DR-Ql <= [email protected] H=localhost (67.222.16.69) [127.0.0.1]:34436 P=esmtpa A=dovecot_login:[email protected] S=614 [email protected] T="test" for [email protected]
    Based on the above line we can see mail is attempting to be sent from [email protected] to [email protected]. 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.
     
    Garrett likes this.
  5. KH-Jonathan

    KH-Jonathan Director of Managed Services Staff Member

    Please also run this command:

    Code:
    dig mx +short blacktower.com
     
    Garrett likes this.
  6. Garrett

    Garrett New Member

    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 <= [email protected] H=localhost (67.222.16.69) [127.0.0.1]:34436 P=esmtpa A=dovecot_login:[email protected] S=614 [email protected] T="test" for [email protected]
    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 [email protected]
    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 == [email protected] 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?
     
  7. KH-Jonathan

    KH-Jonathan Director of Managed Services Staff Member

    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.
     
    Garrett likes this.
  8. Garrett

    Garrett New Member

    Great, I like to keep things simple. Thanks for your assistance, you made my day!
     
  9. KH-Jonathan

    KH-Jonathan Director of Managed Services Staff Member

    That's what we're here for :)
     

Share This Page