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.

Invalid DNS record: IP addresses are not allowable exchange values.

Discussion in 'E-mail Discussions' started by sehh, Sep 14, 2010.

  1. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    I'm trying to add a second MX entry to a domain with priority 10, via the WHM "Edit DNS Zone" page.

    Unfortunately, I get the following error:

    Invalid DNS record: IP addresses are not allowable exchange values.

    The first MX entry is for mail.domain.com and the second MX entry that I'm trying to add is a plain IP address.

    Any help would be appreciated.

    Thank you.
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    An MX record cannot point to an IP address or a CNAME record. An MX record must point to an A record, and the A record then points to an IP address. Trying to add an MX record that points to an IP address is invalid, and this is why the DNS editor is denying it.
     
  3. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    First of all, thank you for the prompt reply, much appreciated.

    So, in order for me to add a secondary MX server, I have to:

    1) Create an A record (eg "mail2") which points to my IP address.
    2) Create the secondary MX record to point to the above A record ("mail2.domain.com").

    I'll give that a try. Thanks again.

    PS:
    Looking at various configurations, it seems that there ARE MX records which point to a CNAME. Maybe there is an exception to the rule? (MX points to mail.domain.com, which is a CNAME for the A record of domain.com).
     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    According to this RFC, the use of a CNAME in an MX record is discouraged, if not invalid:

    http://www.rfc-editor.org/rfc/rfc2181.txt

    I also found the following, which discuss the issue in some detail:

    Exchangepedia: Should MX record point to CNAME records (aliases)?
    Chapter 8 - CNAME Record

    One important consideration is that, if an MX record points to a CNAME, then an addition DNS lookup must be done: one to find the MX record(s) for the domain, then another to get an A record for the CNAME, then yet another to get an IP address for the A record. Not using a CNAME prevents an additional DNS query.

    It does appear that pointing an MX record to a CNAME, while it may work in some situations, should be avoided, if for no other reason than to avoid an extra DNS query.
     
  5. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    Perfectly understood, nice explanation, thank you!
     
Loading...

Share This Page