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 records seem to be ignored

Discussion in 'General Discussion' started by pubwvj, Mar 16, 2004.

  1. pubwvj

    pubwvj Active Member

    Joined:
    Mar 15, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    In the Mountains of Vermont
    I am trying to get mail to route from multiple domains all to a single domain (BLTserve.com in the example below), preserving the mailbox/UserID. This way mailboxes are only created and maintained on the single domain. I want to do this with MX records. I have done this for over a decade but am new to WHM/CPanel. I've read the manual. The problem is:

    MX records aren't working in CPanel.

    Please prove me wrong. :) Show me...

    Here is my latest test set:

    I wiped out the accounts on the WHM/CPanel web host so they would start completely from fresh and I have been going through and systematically changing one thing at a time to try and figure this out.

    On a completely seperate server on a seperate NOC with a seperate web host I have another domain setup HollyGraphicArt.com which is my test case for a remote MX since it has been suggested that having them all on the same server is an issue.

    Treating BLTServe.com as the destination...
    Treating TransferToner.com as the domain to be rerouted...

    Default email: *@bltserve.com on the transfertoner.com results in lost mail.

    Alias/Forward: *@transfertoner.com->*@bltserve.com just delivers to the transfertoner.com domain. The forwarding is ignored. Okay, so no wildcard *. Others ideas?

    MX: changing transfertoner.com's MX in CPanel to be any of the following (mail.bltserve.com, bltserve.com, hollygraphicart.com or mail.hollygraphicart.com) continues to result in delivery of mail to the transfer@transfertoner.com mailbox.

    I also entered an IP address (my DSL) in CPanel for transfertoner.com and CPanel accepted it. It shouldn't as it is not a fully qualified domain name (FQDN). I then sent a test mail and once again it went to the transfer@transfertoner.com mailbox.

    MX appears to be totally ignored by CPanel/WHM.

    Ideas? Solutions? Whitty remarks?
     
  2. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    If your domain is listed in /etc/localdomains, than cPanel will not even look at the MX records. This saves resources.

    As for the FQDN issue, I would agree that cPanel should now allow IPs in MX records, although for some mail servers it does work, it is against RFC.
     
  3. pubwvj

    pubwvj Active Member

    Joined:
    Mar 15, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    In the Mountains of Vermont
    "If your domain is listed in /etc/localdomains, than cPanel will not even look at the MX records. This saves resources."

    Okay... but unfortunately as a reseller I don't have telnet access and can't modify the /etc/localdomains file. I have passed your note on to my provider though. It does seem odd that both WHM and CPanel have places to modify the MX records but then it gets ignored. Why? How does the WHM or CPanel user control this asside from asking an admin to pico the localdomains every time they want to make a change?
     
  4. PbG

    PbG Well-Known Member

    Joined:
    Mar 11, 2003
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    It gets ignored only if you lack sufficient permission to change them . . .
     
  5. pubwvj

    pubwvj Active Member

    Joined:
    Mar 15, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    In the Mountains of Vermont
    "It gets ignored only if you lack sufficient permission to change them . . ."

    Hmm... I'll check this but, I have permissions since the MX records do change when I edit them.

    I can do it the following ways:
    CPanel: Modify Mail Exchanger (MX Entry)
    WHM: Edit an MX Entry
    WHM: Edit a DNS Zone
    and the changes are reflected in the DNS Zone and MX records. The mail (Exim) just seems to be ignoring the MX.

    Or do you mean something else?
     
  6. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Yes that does seem odd. I always wondered why the option even existed in cPanels.

    Maybe cPanel can add a WHM function for changing MX records to point off-server (with an option/checkbox to act as a secondary MX) that actually adds and removes the accounts from the appropriate files (localdomains, remotedomains, secondarymx).
     
  7. pubwvj

    pubwvj Active Member

    Joined:
    Mar 15, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    In the Mountains of Vermont
    That would be really nice. My service provider (VONetwork.com - nice guys) and I have been beating our heads against the wall. It looks like it should work. I hope CPanel will address this asap.
     
  8. PbG

    PbG Well-Known Member

    Joined:
    Mar 11, 2003
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    I am told if you remove the domain from each of the servers etc/localdomains folders the server will be forced to do a DNS lookup. this is necessary for the zone/MX records desired to be looked up and/or observed.

    I had a similiar situation where I wanted root mail from multiple servers to forward to the mx record with the lowest priority for the domain. Problem is that when the domain is also local no DNS lookup is performed. My solution was to forward root mail from the respective servers to the server hostname governing the mx record with the lowest priority. In other words:

    root mail from server2, 2, 3, 4 etc gets forwarded to user@serverhostname.domain.com

    Perhaps some variation of this will work for you??
     
  9. pubwvj

    pubwvj Active Member

    Joined:
    Mar 15, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    In the Mountains of Vermont
    Catchall forwarding doesn't work as it doesn't preserve the mailbox of the incoming mail. I just want one domain handling the mail for all the domains. Mailboxes/userID's need to be preserved across domains. e.g., j@a.com->j@a.com, m@b.com->m@b.com but you can't know ahead of time what m and j will be at a and b. :) MX does this, when it works.

    I got a response from CPanel tech support suggesting to:

    We've tried that but no joy yet. Still working on it with Daniel at CPanel and my provider. The big difference between how I used to do it and now appears to be that in the past my mail server domain (c) was on a physically different machine than the (a, b, etc) other domains.

    Ve vill continue our research into ziss problem! :)
     
  10. skanwhost

    skanwhost Member

    Joined:
    Dec 24, 2003
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Modify MX Records

    Have you been able to determine a fix for changing the MX Record and having it recognized?

    I have been trying to access the localdomains / remotedomains / userdomains but have been unable to?


    Can someone please provide me with the exact commands I would type to access the above and modify them for MX records to take effect?

    Thanks in advance for any help!

    Sydney
     
  11. omegatng

    omegatng Member

    Joined:
    Aug 12, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Anyone had any luck with a solution? I'm experiencing this too.
     
  12. Big Gorilla

    Big Gorilla Active Member

    Joined:
    Jan 30, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Re: Modify MX Records

    Changing the MX record via cPanel will effect where the mail goes for all external mailhosts sending mail to your domain. To get local mail also redirected, the system administrator for the machine will have to manually edit /etc/localdomains and remove the domain. Then all your mail should work properly to your alternate off server MX host.
     
  13. Big Gorilla

    Big Gorilla Active Member

    Joined:
    Jan 30, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    All the MX record does is tell mailservers where to send the mail. It doesn't modify the mail, and it doesn't tell the server what to do with the mail once it gets there, and the server that receives the mail as no knowledge of what MX record was used.

    The server that's defined as the MX has to have all of the domains it receives mail for defined as local domains, so that it knows that it's supposed to process the mail locally, and not forward it somewhere else. If the only MX defined does not have the domain listed as local, it will go into a mail loop trying to repeatedly send the mail to itself.

    The problem with what you are trying to do, if I understand you correctly, is that you are trying to send all the mail for multiple domains to one domain on the same host. That basically won't work because the only way that host will accept the mail is if those domains are listed as local, but then they'll process them into each domains separately as is the default.

    If you have domainA.com, domainB.com, domainC.com, and somedomain.com all on the same server, the there is absolutly no difference in the following definitions:

    somedomain.com IN MX 0 domainA.com
    somedomain.com IN MX 0 domainB.com
    somedomain.com IN MX 0 domainC.com
    somedomain.com IN MX 0 somedomain.com

    somedomain.com would be handled exactly the same in all 4 scenarios.

    I won't go as far as to say it can't be done, especially since I'm not sure what you do with the mail once it arrives at your one domain, but it will take much more than just MX definitions to do it.
     
  14. FreedomNet

    FreedomNet Active Member

    Joined:
    Mar 29, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Re: Re: Modify MX Records

    We have this same issue. The MX records are ignored. We edited /etc/localdomains to remove the host name so local generated email should be routed to the off host mail server, but instead any local fails with "unrouteable mail domain "failing_domain.com" We are converting from Ensim control panels and they do not ignore MX records so we are at a lose how we can get this fixed. Any help would be GREATLY appreciated.

    THANKS!
    Don
     
  15. Big Gorilla

    Big Gorilla Active Member

    Joined:
    Jan 30, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Don,

    Try checking your sever to see what it thinks the MX records are.

    Either use the Mail Troubleshooter in WHM (input an email address of the domain in question), or try "host -t mx yourdomain.com" from a shell prompt ("host -vt mx yourdomain.com" if you want to get more detailed output including what nameserver delivered the query result).

    They should return the records of your remote mailserver(s). If they don't, you still have a DNS server somewhere with the wrong MX information.
     
  16. FreedomNet

    FreedomNet Active Member

    Joined:
    Mar 29, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Thanks so much for your time to hel p with this. I tried it with letting the mx records for the domain in cpanel default to mail.domain-name.com and then put in the IP address of the offhost mail server (like we used to do for Ensim) here is what the host comand returns:

    host -vt mx millsfloral.com
    Trying "millsfloral.com"
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57585
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

    ;; QUESTION SECTION:
    ;millsfloral.com. IN MX

    ;; ANSWER SECTION:
    millsfloral.com. 14400 IN MX 0 68.157.169.3.

    ;; AUTHORITY SECTION:
    millsfloral.com. 14400 IN NS ns.freedomnetworking.net.
    millsfloral.com. 14400 IN NS ns2.freedomnetworking.net.

    ;; ADDITIONAL SECTION:
    ns.freedomnetworking.net. 14400 IN A 67.18.1.196
    ns2.freedomnetworking.net. 14400 IN A 67.18.1.197

    68.157.169.3 is the correct IP of the offhost mail server
     
  17. omegatng

    omegatng Member

    Joined:
    Aug 12, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I'm not impressed with Cpanel's handling of this issue, this has been open for quite some time.

    I removed a domain that needs this from localdomains too,but is it necessary to add the domain to /etc/remotedomains ?

    Now all they get is bounces from the server.
     
  18. Big Gorilla

    Big Gorilla Active Member

    Joined:
    Jan 30, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Using an IP address as the MX record is not RFC-compliant (meaning that some mailers will refuse to deliver mail to it, or detect it as an error). Exim, the mailer installed with cPanel, will by default refuse to send mail to an IP address MX record.

    You should assign an A record to that IP address (it looks like mail.millsfloral.com is already set to that address so you are good there) and change the MX record to use the name, not the IP address, so:

    millsfloral.com. 14400 IN MX 0 mail

    or

    millsfloral.com. 14400 IN MX 0 mail.millsfloral.com.

    should work.

    If you are setting the MX record in cPanel, just set the MX to "mail.millsfloral.com" and it will define the MX record appropriately.
     
    #18 Big Gorilla, Apr 23, 2004
    Last edited: Apr 23, 2004
  19. FreedomNet

    FreedomNet Active Member

    Joined:
    Mar 29, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Big Gorilla thanks for your continued help!!!

    Okay if I understand correctly here is what the DNS should look like (www.millsfloral.com is the website on the server generating the email that should be routed to the remote mail server at 68.157.169.3):

    millsfloral.com. 14400 IN NS ns.freedomnetworking.net.
    millsfloral.com. 14400 IN NS ns2.freedomnetworking.net.
    millsfloral.com. 14400 IN A 67.18.1.221 (address of local web site)
    localhost.millsfloral.com. 14400 IN A 67.18.1.221
    millsfloral.com. 14400 IN MX 0 mail.millsfloral.com.
    mail 14400 IN A 68.157.169.3 (address of remote mail server)
    www 14400 IN CNAME millsfloral.com.

    Plus remove the millsfloral.com entry in /etc/localhosts

    Unfortunately, the locally generated email is not sent off to the remote email server, it is just sent to the local cPanel default undelivered mail box for this domain.

    Did I mess up your instructions?

    Thanks Again!
    Don
     
  20. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yes, you must also put the domains removed from /etc/localdomains into /etc/remotedomains, otherwise if select the option under WHM > Email > Rebuild/Fix Mail Dbs/Boxes, it will simply put the domains back into /etc/localdomains.
     
Loading...

Share This Page