mail server at a different location and can't send to it HELP PLEASE

Canar

Registered
Sep 8, 2006
4
0
151
I have a website hosted in a hosting center running WHM and cpanel. There is an A record for www.mydomain.com that points to it.

My mail server is at a different location. (mail.mydomain.com) It also has an A record and an MX record that point to the correct location.

When my WWW server tries to send an email to [email protected] it is getting confused. It fails and never sends it off the server to my mail server that is at the other location. It appears that it thinks it is mydomain.com. I have changed the mx record in cpanel to say mail.mydomain.com. It still keeps failing. It will send mail everywhere else fine.

If anyone can help me get this fixed it would be great.
 

CTC

Active Member
Nov 29, 2006
25
0
151
same issue

Can u post a dummy guide for root access commands to perform this task.
Typing pico remotedomains brings up a blank page.

I have the same problem.
 

verdon

Well-Known Member
Nov 1, 2003
945
16
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
Sorry, I'm not the best to answer this. I don't use cl editors very much* That said, pico and vi have pretty good man pages.

One thing, if your current working directory is not /etc then you would need to...
pico /etc/remotedomains

If the file /etc/remotedomains doesn't exist, then I guess you would need to...
touch /etc/remotedomains
... first, then ...
pico /etc/remotedomains

To be honest, I don't remember if I had to create /etc/remotedomains the first time or if it was already there by default.

rgds,


* I normally use an ssh client that allows me to open files in my local editor (BBEdit) where I am much more comfortable working.
 

dafut

Well-Known Member
Dec 14, 2005
74
0
156
I believe the remotedomains file has to be created the first time it's needed. At least on my VPS that was the case.

If it's the first time, you can use this command to create the file:

# echo domain.tld > /etc/remotedomains

If you're adding to an existing remotedomains file, use the append ( >> )command:

# echo domain.tld >> /etc/remotedomains

You'll still need to manually edit the localdomains file...