massive autodetect mail configuration

urgido

Well-Known Member
Jul 19, 2005
129
10
168
cPanel Access Level
Root Administrator
Is there a way to change all dns to Automatically Detect Configuration on mail configuration? This is because for some reason after migrate to a new server some dns zones that are working with gmail these change to Local Mail Server and this is affecting some of my customers.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello :)

Internal case number 108461 is addressed in cPanel version 11.46:

Fixed case 108461: Preserve the MXCHECK setting when transfering an account.

As a solution to this post-transfer issue, the following command should be useful:

Code:
/scripts/checkalldomainsmxs
This script will check the DNS Zones on your server and adjust the following files according to its findings:

Code:
/etc/localdomains
/etc/remotedomains
/etc/secondarymx
Aside from adjusting the MXCHECK value by hand (through the "WHM -> Edit DNS Zone" feature), you could utilize our API to take advantage of the following function:

Email::setmxcheck

You could loop it through all of the domains on the server and set the mxcheck value accordingly.

Thank you.