Setup external MX records in cPanel

Categories General Info

If your domain is using external an mail server like Google mail for its pop and smtp activities, you need to make the following changes in your cpanel server.

Go into WHM / DNS Functions / Edit a DNS Zone and select the domain >

where it says;
mail | 14400 | cname | domainname.com
change to
mail | 14400 | A | 222.222.222.222 ( which is the IP of your customers preferred mail server)

This will point the system to the new mail server. Now, log into your server as root using SSH and

REMOVE the domain from /etc/localdomains and then ADD the domain to /etc/remotedomains.

and then restart exim. Check your configuration via the following command to send a test email.

sendmail -v “test@gmail.com”

sendmail should connect to google via the mx records. You can also use the following command to find an MX record :

dig domainname.com MX

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.