Help setting up new hosting account to migrate existing Domain into

Discussion in 'Linux VPS/Dedicated - General' started by MBhelpdesk, Sep 11, 2012.

  1. MBhelpdesk

    MBhelpdesk New Member

    Hi,

    I've recently set up a new VPS hosting plan and have an existing domain registered and running with another provider. The intention is to set up the same domain on the VPS to allow the web design company to loaded the new site framework and for us to load content. While this is going on, the existing site continues to run with the other provider until we request them to update the domain nameservers to point at my KH nameservers.

    But, I've been having a few problems! If I set up my domain account, say mydomain.com the creation process works fine but I get issues with exim mail from host.mydomain.com as I need to use a remote MX record. So it suggests there's a problem with my DNS setup.

    If I set up the DNS zone file to mirror what's currently setup for the MX record my mail freezes from exim and I can't get it to work, not matter what I do. If I delete the DNS zone all works fine. But when I come to switch over the site to KH I have to have a DNS zone set up with all the relevant entries and then get the domain registrar to point at the KH nameservers

    Is there a newbie guide to set up a new domain account and migrate a running domain from another hosting provider to KH? Or can somebody give me some good pointers/checklist to follow?

    If this a duplicate of an existing thread then please just point me to it?

    Thanks.
     
  2. Dan

    Dan Moderator

    Hello MBhelpdesk,

    You didn't say what control panel you are using but I know that cPanel can be configured for an external MX record but I am confused by your saying that your mail freezes with the external MX because isn't that what you want? The external MX server is handling your mail not your local exim so you would not see the local exim handling it, isn't that correct?
     
  3. MBhelpdesk

    MBhelpdesk New Member

    Thanks for the reply Dan.

    I'm using cpanel/WHM. I was thinking about this today and it occurred to me that if I have an external mail service then I probably need to change the MX records for ALL dns zones, i.e. the nameservers, host and domain zone files and not just the domain I created. And as you say exim then won't be handling any mail locally.

    Additionally I was thinking ahead to the actual cutover of my existing domain from the current hosting provider who also hold the domain records. So I request them to change the domain records to point at my new nameservers, but would I populate all my additional records for that domain in the zone file for the nameservers or the domain itself?
     
  4. Dan

    Dan Moderator

    Hi MBhelpdesk,

    I wouldn't do this. For one thing the majority of those will never receive email anyways but also just because one domain uses that external MX doesn't mean that they all need to.

    For instance I have numerous domains (I also am on cPanel/WHM by the way) that use the local MX. Then I have one for a company that has their own Exchange server so there is an external MX where my VPS acts as backup. Then I have a number of domains that use Google Apps so there are external MXs and my VPS acts as backup again.

    If you create the domain and let the system create it's default DNS zone then use the DNS editor to change the MX records when you commit the changes you can let cPanel automatically detect MX records and if it sees that you set it for external MX records it will disable exim for that domain, remove that domain from the localdomains file, and also add the domain to the remotedomains file. Other than changing the MX records it will be pretty automatic.

    What additional records are we talking about? If it's all for one domain then they should all be in the dns zone for that domain.
     
  5. MBhelpdesk

    MBhelpdesk New Member

    So, I've just recreated my domain and left it using the VPS nameservers. I then checked the exim queue on the host (not the domain) and it stalled. I then updated the domain zone file and changed the MX. When I saved this I got the message:

    The updates I made to the domain zone file looked ok - added an A record for mail.mydomain.com and updated the MX to:

    A DNS lookup then returns:

    I then flushed the exim queue on the host and mail is now being delivered. Previously when I created the domain I checked the option to use the nameservers at the domain registrar. So this is progress, although the error I get from the DNS zone file update concerns me as this is suggesting something is missing in the nameserver zone files?

    To answer the last query, yes all the additional records are specifically for the domain, e.g. a subdomain for an external blog and online store etc. so thanks for confirming that they need to go in the domain zone file.
     
  6. KH-Dmitry

    KH-Dmitry Administrator Staff Member

    The error clearly says there's no address records for the nameserver, ie. your zone doesn't have

    Code:
    ns1.mydomain.com.   IN   A  <ns1_ip_address_here>
    ns2.mydomain.com.   IN   A  <ns2_ip_address_here>
    
    because of this error the zone was not loaded by the nameserver therefore it returns SERVFAIL when asked to resolve names from this particular zone.
     
  7. MBhelpdesk

    MBhelpdesk New Member

    That makes sense, so I added these entries and now the mail queue on the host is frozen again?? So I'm back at the point I was originally and I don't quiet understand how to resolve this.

    It seems there a conflict going on now that my host resolves mail.mydomain.com to the correct external address but it's using a local MX host.mydomain.com and my host is set up to send mail to an external email <[email protected]>

     
  8. KH-Dmitry

    KH-Dmitry Administrator Staff Member

    you might have mydomain.com defined as local domain in exim config.
     
  9. MBhelpdesk

    MBhelpdesk New Member

    I've made no changes to the exim config file and I can't find anything in there that suggest I have mydomain.com as a local domain.

    If I switch my resolv.conf to point DNS to resolve externally then exim works ok:

    If I switch it back to the default config with localhost first:

    So I'm only seeing an issue when my host is trying to resolve from itself. Could this be an issue because my host and domain are only currently visible as IPs on the internet? At present the domain mydomain.com is hosted by another provider using their nameservers.
     
  10. Dan

    Dan Moderator

    Hi MBhelpdesk,

    The domain (including MX records) will not resolve until you change your nameservers at the registrar, that sounds to be part of the problem that you are seeing. Once you create the domain on your KH machine it knows that it should be hosting it but it is unable to resolve because the NS information at the registrar is different so...no traffic. This is normal and expected until the nameservers are changed.
     

Share This Page