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!

Mail routing and MX records

Discussion in 'General Discussion' started by Bdzzld, May 9, 2018.

  1. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    391
    Likes Received:
    4
    Trophy Points:
    168
    Hi,

    We've noticed that "Mail routing" remains "local" even though users have changed the MX records to point to external servers and no longer to the server itself. Ain't it an idea to automatically change "Mail routing" to "external" when the MX records are being changed to point to external servers? Or at least give users a notification about this so they're aware of this.

    We've had customers contacting as by e-mail which thought we did not answer back because of this "glitch" as their e-mails were still locally delivered instead. That's highly frustrating!

    Also is there a tool or script to automatically set the "Mail routing" for each domain to its correct setting depending on the currently set MX records? This would be appreciated as a quick fix.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @Bdzzld

    If you go to WHM>>DNS Functions>>Edit DNS Zone -> select domain -> when the zone loads, scroll to the bottom of the Edit DNS zone interface, you'll see a few options:

    If Automatically Detect Configuration is selected when the user changes their MX records it will automatically detect that their MX records are set remotely.

    There is a UAPI function that will set this UAPI Functions - Email::change_mx - Developer Documentation - cPanel Documentation but you'd need to create a script to loop through your users to change it on all of them.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    391
    Likes Received:
    4
    Trophy Points:
    168
    @cPanelLauren : Thanks for taking the time to respond.
    I'm familiair with the mentioned feature: "Automatically detect configuration: Local" was set, despite the MX records pointing to external mail servers (which should have been "Automatically detect configuration: Remote"), So I safely assume the function() to change this is not executed at all after the change of MX records or not correctly.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Bdzzld

    That's interesting, I am able to replicate this behavior when attempting to modify MX records through the cPanel UI, though my settings are set to automatically detect configuration. As a result of this I opened an internal case CPANEL-20346 for our developers to look further into.

    Thank you for bringing this to our attention. As soon as I have more information or updates on the case I'll update this thread.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Bdzzld

    Bdzzld Well-Known Member

    Joined:
    Apr 3, 2004
    Messages:
    391
    Likes Received:
    4
    Trophy Points:
    168
    @cPanelLauren : Good to hear, you were able to replicate the problem. Can't wait for the fix as well as a scripts to cope with the current incorrectly set DNS records due to this... The last update of the DNS records in question were made in November, so this bug must have been there at least for half a year... Very strange no one has brought it to your attention earlier...
     
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Bdzzld

    I found it pretty strange too, though looking back at tickets we've addressed I believe we have but weren't aware of the cause. Without knowing how the MX records were changed the assumption was a manual modification was done which left a domain in /etc/localdomains when MX records were changed. The resolution for this was just to remove the domain from /etc/localdomains. I've sent a note out to our support analysts to be aware of this behavior as well.

    Thanks!
     
    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