The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'E-mail Discussions' started by Canar, Jan 6, 2007.

  1. Canar

    Canar Registered

    Joined:
    Sep 8, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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 user@mydomain.com 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.
     
  2. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    On the server where your www is, you need to remove your domain from /etc/localdomains and add it to /etc/remotedomains
     
  3. CTC

    CTC Active Member

    Joined:
    Nov 29, 2006
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  4. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    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.
     
  5. dafut

    dafut Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    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...
     
Loading...

Share This Page