Skip to main content

Account creation via API defaults to local mail exchanger

Comments

5 comments

  • JayFromEpic
    From what I found in the API docs, the mxstring should do this but it will not set the actual mx entry. Here is the doc I looked at: WHM API 1 Functions - createacct - Developer Documentation - cPanel Documentation
    0
  • cPanelLauren
    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: [QUOTE] mxcheck string The account's main mail exchanger's type. Note: The function does not configure the primary MX entry to point to the appropriate exchanger. You must
    0
  • bmett
    Thanks for the replies, looks like I can get this sorted by adjusting my API call.
    0
  • bmett
    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?
    0
  • cPanelLauren
    Hi @bmett The script as follows would actually be better to run than what manually moving them: /scripts/checkalldomainsmxs --yes
    Keep in mind this will set the MX records Local/Remote based off the entry in the DNS zone file. There's also the API function that you can loop: UAPI Functions - Email::set_always_accept - Developer Documentation - cPanel Documentation or cPanel API 2 Functions - Email::setmxcheck - Developer Documentation - cPanel Documentation Thanks!
    0

Please sign in to leave a comment.