GoWilkes

Well-Known Member
Sep 26, 2006
666
31
178
cPanel Access Level
Root Administrator
I have 2 servers, and I'm moving one account from the old server (Server A) to a new one (Server B). Right now, I have Server A set to proxy Server B. Server B doesn't have a domain, so IANA — Example domains is proxying over to 12.34.56.78/~example.

A stumbling block that I just discovered is that emails sent from a program on the site are delivered to a POP on Server B, but emails sent from outside of the server are delivered to a POP on Server A.

What I'd like to do is update the domains on Server A so that all emails are automatically directed to the corresponding account on Server B.

Am I correct that the only thing I need to do here is, in WHM, go to "Edit MX Records", select the domain name, and change the existing MX record to Server B's IP address? Ie,

14400 0 12.34.56.78

Or, do I need to also modify the "mail" listing under "DNS Records"?

Further, I have about 50 domains parked on top of the domain that's being proxied, along with 4 subdomains each, so if I do have to change the MX and DNS records, then I'll have to change this 200 times! Is there a faster way to do this; maybe directly editing a file on the server, instead of using the WHM interface?

TIA,

Jason
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
MX records cannot take an IP address as the field. You can only use a fully qualified domain name or hostname for the actual MX entry. You could change the MX to be mail.domain.com. instead, then modify the mail.domain.com. entry to use that new IP for the A record.
 

GoWilkes

Well-Known Member
Sep 26, 2006
666
31
178
cPanel Access Level
Root Administrator
I changed the MX to mail.example.com, but got the following error:

Reconfiguring Mail Routing:
Auto Detect of MX configuration not possible due to non-resolving MX entries. Defaulting to last known setting: .
The following entries could not be resolved: mail.example.com

When I went back to Edit MX Records, the new setting was there, though.

I changed the CNAME and got the same error. Is this something that will correct itself after the TTL has completed?
 
Last edited:

GoWilkes

Well-Known Member
Sep 26, 2006
666
31
178
cPanel Access Level
Root Administrator
Update:

I added an A record of:

server3 A 12.34.56.78

Then, changed the CNAME to:

mail CNAME server3.example.com.

After some research, this should theoretically work, but I guess I'll find out in 14400 seconds :)
 

GoWilkes

Well-Known Member
Sep 26, 2006
666
31
178
cPanel Access Level
Root Administrator
Second update:

No, this gave me an error message:

Message not sent. Server replied:
Requested action not taken: mailbox unavailable
550 Verification failed for <[email protected]>
The mail server could not deliver mail to xxxx.xxxxx.com. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.
Sender verify failed

The xxxx.xxxxx.com refers to my email account, not the recipient of the email. This message came from SquirrelMail (which logged in to the old server, not the new one).

I'm guessing that I have to modify the DNS record on the new server to allow the old server to log in? That's just a guess, though. Any suggestions on how to do that?
 

GoWilkes

Well-Known Member
Sep 26, 2006
666
31
178
cPanel Access Level
Root Administrator
Sorry for yet another update! I've just been working on this literally all day and all night.

After making a ton of variations, I suspect that I need to change something in the Exim configuration of the new server (Server B). I thought that adding the IP of Server A to /etc/relayhosts on Server B might do the trick, but it had no apparent impact.

FWIW, I disabled the firewall on both servers while making these changes, so I can rule that out as the problem.