We are aware of a potentially service impacting issue. Learn more

MX Records pointing to other servers Print

  • 7

A question reaching us regulary: We want to host the mail from one or more domains on our server on a dedicated mail server instead on our cpanel machine.

It does not really matter if you use cpanel or any other linux/unix based OS running exim. These are the steps to take:

What you want to do is ssh to your server as root, edit /etc/localdomains, find the domain and remove it from the list.

You then need to edit /etc/remotedomains and add the domain to that list. This tells the mail server that the domain is not local and to lookup the correct mail server and send the message to it.

We also recommend that you add the domain to /etc/secondarymx. Doing this tells the mail server that it's allowed to accept mail for this domain but only to hold it until the primary mail server is online.

if /etc/secondarymx or /etc/remotedomains does not exist create them!

Failing to remove the domain from /etc/localdomains may result in problems with sending emails from your server to this domain.

note: some people try to create /etc/localdomain or /etc/remotedomain this is wrong, pleas see the correct names above.


Was this answer helpful?

« Back