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!

Account creation via API defaults to local mail exchanger

Discussion in 'E-mail Discussion' started by bmett, Aug 6, 2018.

  1. bmett

    bmett Well-Known Member

    Joined:
    Aug 5, 2010
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Brisbane, AU
    Hi there,

    For some reason, all accounts we create via the WHM API end up will the mail exchanger set to "local", despise the fact the mx records are pointing to an external mail server by default.

    How can I fix this? New accounts need to have the mail exchanger set to "external"/

    Cheers
     
  2. JayFromEpic

    JayFromEpic Well-Known Member

    Joined:
    Apr 2, 2011
    Messages:
    209
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Scottsdale, AZ
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    bmett likes this.
  3. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @bmett

    It doesn't actually matter "where" the MX records are pointed to for this purpose the MX defaults to local if you're not putting it in. You should be setting the mxcheck parameter to auto if you have some domains that are remote and some that are local.

    This is explained in the documentation @JayFromEpic linked:

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. bmett

    bmett Well-Known Member

    Joined:
    Aug 5, 2010
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Brisbane, AU
    Thanks for the replies, looks like I can get this sorted by adjusting my API call.
     
  5. bmett

    bmett Well-Known Member

    Joined:
    Aug 5, 2010
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Brisbane, AU
    Actually, one more question:

    How would I go about changing a lot of accounts on one server to "remote mail exchanger"? Is there a script I can run? After a mass account restore, all accounts (several hundred) on the server are set to "local mail exchanger" although all of them have external MX records.

    I was under the impression that removing all domains from /etc/localdomains and adding them to /etc/remotedomains would fix this, but it doesn't. Do I need to restart or rebuild anything after editing above to lists?
     
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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