Question
How do I automatically update the Remote or Local Mail Exchange entries for all domains?
Answer
cPanel has the /usr/local/cpanel/scripts/checkalldomainsmxs script that will attempt to determine if a domain's mail is supposed to be handled locally or remotely.
- Connect to your server using SSH as the
rootuser. Make a copy of your local and remote domains files:
# cp -v /etc/localdomains{,.$( date +%Y%m%d )}
# cp -v /etc/remotedomains{,.$( date +%Y%m%d )}
Run the script with the required flag to confirm:
# /usr/local/cpanel/scripts/checkalldomainsmxs --yes
CPANEL_WARN: As this script affects all domains on the server, you must include the
--yesflag when you run the script.
Comments
0 comments
Article is closed for comments.