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.

MX record help

Discussion in 'E-mail Discussions' started by adataman, Jan 12, 2015.

  1. adataman

    adataman Member

    Joined:
    Dec 8, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    On my VPS i have a domain example.com, I am using an external shopping cart for it hosted on a 3rd party server, so I had to change the A record for that domain to point to their IP address...
    The issue I now have is that any mail sent to that domian is not coming as there is no email account setup t the 3rd party location and is getting routed there.
    What I want to do is be able to keep the mail coming to my VPS were i have the example.com account created.
    I have been searching and reading but am stuck, I need help how to setup the MX record to keep mail coming to my server for example.com
    Thanks
    Tom
     
  2. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hey adataman,

    You can think about editing the MX record for the domain from either WHM or cPanel interface. What you really need to do is open the file to be edited, find the following piece of info there :

    domain.com TTL IN MX - mail.domain.com ( if this is not like this, may it look like this )

    Near to this, you will find the line marked mail, which will be with the DNS record CNAME, change it to A record and in the next field give your local server IP, which will become like :

    mail TTL IN A - Local IP.


    So basically this will be your records :

    =============

    domain.com. 14400 IN MX 0 mail.domain.com

    mail 14400 IN A IP ( local IP )


    =============

    Also, make sure this domain is listed in the file /etc/localdomains
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    When editing the DNS Zone or MX record, ensure that "Local Mail Exchanger" is selected under "Email Routing" so the domain name remains in the /etc/localdomains file.

    Thank you.
     
  4. adataman

    adataman Member

    Joined:
    Dec 8, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Triantech and cPanel Michael,
    Everything now seems to be working great :)
     
  5. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hey adataman,

    Great to know :)
     
Loading...

Share This Page