Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Remote MX, O365

Discussion in 'E-mail Discussion' started by Ian Durey, Apr 1, 2019.

  1. Ian Durey

    Ian Durey Member

    Joined:
    Aug 1, 2017
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Regina, SK
    cPanel Access Level:
    DataCenter Provider
    One of my users decided to move his email to O365 while keeping his website on the cPanel server, now other users (using other domains) on the same server can't email him. I'm sure this has to do with a messed up MX record somewhere. I've set the MX record to "remote" and userdomain-com.mail.protection.outlook.com but local users are still getting "retry timeout exceeded" errors on emails to userdomain.com.

    Can someone point me in the right direction on this?
     
  2. Ian Durey

    Ian Durey Member

    Joined:
    Aug 1, 2017
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Regina, SK
    cPanel Access Level:
    DataCenter Provider
    After doing some more reading I believe the solution is to create a manualroute in the POSTMAILCOUNT section of exim config:

    Code:
    o365_route:
      driver = manualroute
      domains = +userdomain.com
      transport = remote_smtp
      route_list = * userdomain-com.mail.protection.outlook.com
    Does that seem right?
     
  3. Ian Durey

    Ian Durey Member

    Joined:
    Aug 1, 2017
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Regina, SK
    cPanel Access Level:
    DataCenter Provider
    I am still getting "host lookup did not complete" on this, so clearly I'm not doing something right. Any help is appreciated.
     
  4. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,207
    Likes Received:
    75
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    I did something similar about a year ago.
    The domain was hosted on my server, but the emails were all being handled by Google, so a similar scenario.
    I had to add a few MX entries in the DNS zone for the particular domain.
     

    Attached Files:

    • mx.jpg
      mx.jpg
      File size:
      51.3 KB
      Views:
      3
  5. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,207
    Likes Received:
    75
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    Incidentally, I wasn't aware of any issues, and it ran like this for a year, maybe more before the domain was migrated away.
    How long did you wait for the DNS changes to propagate.
    This could take 24-48 hours (although a 2 is usually enough I find)
     
  6. Ian Durey

    Ian Durey Member

    Joined:
    Aug 1, 2017
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Regina, SK
    cPanel Access Level:
    DataCenter Provider
    Thanks for your reply. I do have the MX record configured properly. It has been like that for several days.

    I wonder if the issue could be that this domain happens to be the "main" domain of the server?
     
  7. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,207
    Likes Received:
    75
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    Do you have a CNAME entry for 'mail' in the DNS zone
    Whilst I have these for all the domains on my server, I don't have a mail entry in the DNS zone for that particular domain.
    Maybe if you left this behind, it's having some bearing on delivery.
     
  8. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    1,207
    Likes Received:
    75
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    Also, do you have access to the domain properties at registra level.
    Maybe you could let the registra handle the NS records and make the DNS changes at that end ?
     
  9. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,791
    Likes Received:
    442
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    If you've properly modified the MX records for the domain to point to Office 365 and added the DNS records they request I'd suggest ensuring that the domain is no longer present in /etc/localdomains and ensure it is present in /etc/remotedomains. The router or any exim customization shouldn't be necessary for this to function.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Ian Durey

    Ian Durey Member

    Joined:
    Aug 1, 2017
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Regina, SK
    cPanel Access Level:
    DataCenter Provider
    Confirmed it is in /etc/remotedomains, still getting "host lookup did not complete".
     
  11. Ian Durey

    Ian Durey Member

    Joined:
    Aug 1, 2017
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Regina, SK
    cPanel Access Level:
    DataCenter Provider
    I believe this has been resolved. The user domain was referencing ns1.userdomain.com and ns2.userdomain.com but didn't have corresponding A records, so the DNS zone didn't actually exist and DNS lookups were failing. I created A records for ns1.userdomain.com and ns2.userdomain.com and looks like DNS is resolving now. Thanks to those who replied.
     
    cPanelLauren likes this.
  12. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,791
    Likes Received:
    442
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    That sounds about right, I'm glad you were able to find a solution! Thank you for letting us know.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice