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.

How to configure MX for our setup ?

Discussion in 'General Discussion' started by fuzioneer, Dec 26, 2010.

  1. fuzioneer

    fuzioneer Well-Known Member

    Joined:
    Dec 12, 2003
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    We had a cPanel server which died due to hard drive failure and a replacement has been built

    We have another non cpanel server which hosts a website of ours but we had it configured so that email was handled by the cpanel server (The cpanel server is a namerserver for the other servers domain)

    however since the rebuild we no seem to no longer receive email from the domain on the other server (All domains hosted locally on the cpanel server all have 100% email), email is sent ok from the other server domain but not received.

    did a test on the domain using MX Lookup Tool - Check your DNS MX Records online - MxToolbox and the MX record points to the non cpanel server IP

    How should we have our DNS Configured i.e.

    the A host record points to the other non Cpanel server
    the MX record points to the domain (There is an extra field in the MX record line in Edit DNS which just as 0 in it)

    I assume this is where the issue lies, any pointers muchly appreciated
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Code:
    
    1.1.1.1 = IP associated with the account on the cPanel machine
    2.2.2.2 = IP of the website on the non-cPanel server
    
    primarydomain.com.            IN    A            2.2.2.2
    primarydomain.com.            IN    MX           0 mail.primarydomain.com.
    www.primarydomain.com.        IN    CNAME        primarydomain.com.
    mail.primarydomain.com.       IN    A            1.1.1.1
    
    /etc/remotedomains would NOT contain primarydomain.com
    /etc/localdomains WOULD contain primarydomain.com

    That's how I would do it. http://primarydomain.com and http://www.primarydomain.com would then go to the non-cPanel webserver, mail would go to mail.primarydomain.com (the IP on the cPanel server).

    NOTE: a default cPanel-created zone file for a domain looks a little different than that which you see above. cPanel likes to set up primarydomain.com to resolve to the IP of the cPanel server. Then cPanel adds a CNAME for www that references primarydomain.com. Then cPanel adds an MX that points to primarydomain.com.

    Of course, if you are using DomainKeys and SPF (Email Authentication in the cPanel interface for that account), there will be some TXT records as well that cPanel will add automatically to the zone.

    You may choose to have primarydomain.com and www.primarydomain.com as "A records" pointing to 2.2.2.2 or you may prefer to have them switched. Or you may want primarydomain.com to continue to resolve to the cPanel server and then in the /cpanel interface just set a redirect so that any requests to http://primarydomain.com would be redirected to http://www.primarydomain.com (which would be on 2.2.2.2, the non-cPanel webserver).

    Too many possibilities :) But what I have listed will work -- you'd have to access the /cpanel interface via http://mail.primarydomain.com/cpanel though, or through the main IP of the cPanel server.

    I'm sure the last two paragraphs will add needless confusion.

    Mike
     
Loading...

Share This Page