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.

Help with email problem on deleted domain

Discussion in 'E-mail Discussions' started by kappler0, Dec 28, 2011.

  1. kappler0

    kappler0 Member

    Joined:
    Mar 21, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Here is the weird issue I hope you can help me with as i have exhausted my
    knowledge to no avail.

    The cpanel server has several domains and all seems to work fine.

    I recently moved two domains to a new (physical) server.
    The domains moved are targetmyad.com /.net (.net being host) I then transferred
    all the files and got the site up on the new server. (this was a couple weeks
    ago so I know dns is fully propogated)

    The problem is that if i send an email from any other domain/account on the old cpanel server to
    the new server (ie. subscribe(at)targetmyad.com) it bounces BUT it appears that it
    is bouncing locally from the old cpanel server where the domain used to reside. (The domain was terminated through WHM) See the failure email header below: (i edited the "@" to (at) below)

    So i am wondering if something is lingering on the old cpanel server for the
    targetmyad.com domain that is causing this? Any assistance would be greatly appreciated!

    Scott
     
  2. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    You need to check the DNS on the old server. It does not seem to have got the new NS and A records.

    You can verify by doing a dig:

    Code:
    dig MX domainname.com @oldserver.com 
    Code:
    dig any domainname.com @oldserver.com 
     
  3. kappler0

    kappler0 Member

    Joined:
    Mar 21, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Thanks!

    I ran those and this is what was returned:
    root@neweffect [~]# dig MX targetmyad.com

    ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5_7.1 <<>> MX targetmyad.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34669
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

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

    ;; ANSWER SECTION:
    targetmyad.com. 38400 IN MX 5 mail.targetmyad.com.

    ;; Query time: 1625 msec
    ;; SERVER: 4.2.2.1#53(4.2.2.1)
    ;; WHEN: Thu Dec 29 10:42:22 2011
    ;; MSG SIZE rcvd: 53

    root@neweffect [~]# dig any targetmyad.com

    ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5_7.1 <<>> any targetmyad.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59681
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;targetmyad.com. IN ANY

    ;; ANSWER SECTION:
    targetmyad.com. 38340 IN MX 5 mail.targetmyad.com.
    targetmyad.com. 38340 IN NS ns1.targetmyad.net.
    targetmyad.com. 38340 IN NS ns2.targetmyad.net.

    ;; Query time: 0 msec
    ;; SERVER: 4.2.2.1#53(4.2.2.1)
    ;; WHEN: Thu Dec 29 10:43:22 2011
    ;; MSG SIZE rcvd: 103

    -- So, I am perplexed as this shows up - however, the ns1/ns2 are the new servers host? I looked in /var/named/ but do not see anything for this domain? How do i correct this?
    Thanks a lot!
     
  4. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    You should also be doing:

    Code:
    dig a mail.targetmyad.com @oldserverip
    dig a mail.targetmyad.com @newserverip
    
    Dont forget to put in the @NameServerIP

    so that we can check which A record is the issue.

    The A records for the corresponding MX should be XXX.XXX.218.10


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

    Before this you may want to do this:

    Go to WHM on the old server >> Edit DNS Zone.

    Search for the DNS Zone for the domain targetmyad.com which you migrated.

    Update it with the new info and ensure that the MX option below is set to Remote.

    This should also solve your problem, if I have understood what the issue is.
     
  5. Brian

    Brian Well-Known Member

    Joined:
    Dec 1, 2010
    Messages:
    117
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    ruzbehraja is spot on here. Well, updating the DNS records on the old server won't do anything -- but the update to "Remote Mail Exchanger" is the key part of his recommendation.

    Basically what's happening is this:

    When you send mail from the Old server to the domain on the New server, Exim checks its local configuration files to reference whether a domain is Local or Remote. If it's set as Local (Local Mail Exchanger) it doesn't even bother performing any DNS lookups (hence why the DNS changes wouldn't do anything). Instead, it just assumes mail is local and attempts delivery that way. By changing it to Remote (Remote Mail Exchanger) on the old server, the old server will then actually perform a DNS lookup to determine where mail should go. It'll discover it's the New server (assuming DNS on the new server is set correctly) and deliver there.
     
  6. kappler0

    kappler0 Member

    Joined:
    Mar 21, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Thanks - I appreciate the input. One problem though.. The domain was deleted from the old server so no dns zones remain in WHM for that domain... Could they be in a txt file or something somewhere?
     
  7. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Eliminate guess work by doing the dig with both the servers and determine where the problem is, as per my previous post.
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    It would be better to check for the domain being listed in /etc/localdomains on the machine:

    Code:
    grep domain.com /etc/localdomains
    If it is in that file, remove it and re-run "/scripts/mailperm" then recheck the domain isn't being readded to /etc/localdomains file. If it is, then the domain / account didn't get fully deleted. Check if the domain is appearing anywhere in /var/cpanel/users/* location by then doing:

    Code:
    grep domain.com /var/cpanel/users/*
    Above please replace domain.com with the domain name in both listed commands.
     
  9. kappler0

    kappler0 Member

    Joined:
    Mar 21, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Thank you guys..
    I did all you suggested with no success... all appeared correct!

    However after running some other network tests it turns out the data center had stale routes on a network segment that caused the problem..

    Appreciate the help anyway!
     
Loading...

Share This Page