Domain with external DNS: external MX and local mail problem

vapetrov

Member
May 24, 2002
14
0
301
Hello!

I have a user.
He have hosting for domain.com on my CPanel server.
One day he decided to move his mail to Yahoo.
In the registrar control panel he set Yahoo DNS for server his domain. He have properly configured yahoo DNS, he created A-record to point www to my hosting. Mail of his domain served by Yahoo.
All working fine.
Except one thing: If I trying to send a message from my server to his mail address (on the yahoo) my server tried to deliver the message to local mailbox.

I have removed line domain.com from /etc/localdomains and from all other files in /etc/. Also I have removed DNS zone domain.com from my DNS.
But after some time I found domain.com in /etc/localdomains again!..

What I need to do to prevent intercept messages for external mail domains which have webhosting on my server?
 

garrettp

Well-Known Member
PartnerNOC
Jun 18, 2004
312
0
166
cPanel Access Level
DataCenter Provider
You need to move him to /etc/remotedomains instead. You can do this via the shell as you did before or edit his DNS zone in the WHM and at the bottom set the Mail Exchanger to 'Remote'.