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.

New domain MX/DNS issue?

Discussion in 'Bind / DNS / Nameserver Issues' started by Echelon17, Mar 1, 2008.

  1. Echelon17

    Echelon17 Well-Known Member

    Joined:
    May 21, 2006
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Probably a really simple solution to this, but I can't seem to find it anywhere within WHM.

    Basically, when a new domain is created on our server, even if it's remotely hosted elsewhere, by default all mail will attempt to be delivered locally.

    I found the following option within WHM:

    "Automatically setup /etc/localdomains, /etc/remotedomains, /etc/secondarymx based on where the mx entry is pointed." This is enabled (by default), but still appears to be attempting to deliver mail locally, despite the MX being on a remote server.

    If I dig the domain on the server, it's showing the remote IP address, so it's not pulling DNS information locally. If I check /etc/localdomains - the new domain is in there. I assume this is the part where it's getting confused?

    Any ideas how to "fix" this?
     
  2. viraj

    viraj Well-Known Member

    Joined:
    Sep 28, 2006
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi, You'd need to edit the '/etc/localdomains' file & remove the domain's entry. Doing that will make your mail server to direct the emails remotely without looking locally :)
     
  3. Echelon17

    Echelon17 Well-Known Member

    Joined:
    May 21, 2006
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Yeah, I know I can do that, but I need some way of fixing this permanently in the future.

    Any ideas?
     
  4. bradleebaker

    bradleebaker Member
    PartnerNOC

    Joined:
    Nov 11, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1

    We're seeing this across all our cpanel boxes now. i've not had time to check the bug list, but this surely is a new bug that has been introduced during a recent upgrade.
     
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Is your cPanel server configured to use the registered nameservers rather than the local ones?
     
  6. Echelon17

    Echelon17 Well-Known Member

    Joined:
    May 21, 2006
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Can you clarify your question a little please, Kenneth? Do you mean the resolv.conf?

    If so, then no, our resolv.conf uses the nameservers of the server provider so it definitely sees the external MX records. The 'dig' command also verifies this.
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Actually, upon re-reading your post, I had the wrong initial thought. From your description it sounds like the right thing is happening DNS-wise.

    A one-time fix is to load the Zone in the MX or Zone editor, uncheck the box labeled 'Always accept mail locally even if the primary mx does not point to this server. ' and save.
     
  8. Echelon17

    Echelon17 Well-Known Member

    Joined:
    May 21, 2006
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Keith,

    Thanks for the response, but that's not even a one-time solution. Consider the following situation:

    New Client signs up for hosting with me under the e-mail address client@olddomain.com
    The first "welcome" e-mail gets sent to client@olddomain.com and arrives without any problems. New Client is then advised to pay for the hosting before it's automatically setup within WHM, so they proceed to login and pay for it accordingly.

    The payment is processed and olddomain.com is instantly setup on my server. When attempting to send out the account details to client@olddomain.com - WHM incorrectly attempts to send the mail locally, despite the server correctly seeing remote MX records. Because no such mailbox exists for 'client', it is automatically rejected. Even if the mailbox *did* exist, they haven't received login details to access that e-mail with us anyway.


    Can we please look into this and try to diagnose it or get something fixed long-term? Perhaps it's just a silly isolated issue here, but it's something I really need resolved ASAP before it's effectively put a hold on my business if clients order using a preexisting domain.
     
  9. carverrn

    carverrn Member

    Joined:
    Jan 7, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    We're seeing the same issue. We use the Zone Template Editor to set the default MX record to an external mail server we run that all our clients use for their email.

    This worked fine before. I think we started noticing problems after our hosting service updated our WHM/cPanel to WHM 11.2.0 and cPanel 11.11.0-R16983 (our current versions).

    A few users started noticing that scripts run from their sites that sent emails to their domain were getting error messages returned from the local server saying the user did not exist.

    We discovered that even though the WHM DNS/MX information and the cPanel MX information showed that the "Always accept mail locally even if the primary mx does not point to this server" was not set, it still behaved as if it was.

    Toggling the option on/yes and off/no seems to fix the problem for a given account.

    But it is still a problem for each newly created account and other accounts that haven't tried sending to their own domains yet.

    Regards,
    Rich
     
Loading...

Share This Page