This post will discuss on how to configure the mail service for a domain locally, when the domain’s A record points to an external server. This includes changing the MX records for the domain from WHM or cPanel interface of the domain.
Edit the DNS zone of the domain from WHM as :
Home »DNS Functions »Edit DNS Zone
Once the interface for editing pops up, find the portion of line which specifies the MX for the domain. It will be in the format :
domain.com. TTL IN MX priority mail.domain.com.
Make sure the MX record points to the above format.
Find the line which specifies records for ‘mail’
Originally, it would be something like :
mail TTL IN CNAME domain.com
Edit the above line to the following :
mail TTL IN A Local IP
Basically, you have to change the record type from CNAME to A record and specify the local IP of your server.
If this is done for the domain joel1.com, after the change it will look like :
Once this is complete, select the option ‘Local Mail Exchanger‘ in the same page, so that mails are configured to accept locally.
That’s it !