Moving mail server from an existing hosting provider to the new hosting provider

Hi,

I need to set up a mail only server for an existing domain. The website/domain holders want to move their hosting services to another hosting provider and the first step for me to do is to move their existing email boxes.

I would like to do this without any downtime or at least as little downtime as possible.

So far I have set up my linode with Ubuntu 20.4, added default DNS records:

MX Record
mail.domain.com 10

A/AAAA Record
domain.com 172.105.249.234
domain.com 2a01:7e01::f03c:92ff:fecd:83ca

mail 172.105.249.234
mail 2a01:7e01::f03c:92ff:fecd:83ca

www 2a01:7e01::f03c:92ff:fecd:83ca
www 172.105.249.234

And finished this guide: https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql/ except for getting a SSL certificate, because the letsencrypt challenge failed for the domain (because the domain is currently running on another web/mail server. Here's the message of failing:

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.

I can access the domain records, which are now pointing to another IP address and another mail server with SPF and DKIM records and I can access the server itself on which the website and mail is now running. Their current mail server also uses roundcube, which I should install next once I get sorted the SSL certificate problem.

What should I do next? Can I have an SSL certificate on my new mail server while it's not live and when the website and their current mail server is running on another server? If yes, how?

What my DNS records should look like on my current linode? MX records are fine, but do I need the A/AAAA www records in there? or domain.com records?

Or should I approach all of this differently? Is there easier way to just copy the mail server from one hosting provider to another without setting up a new mail server on the new hosting provider(in this case linode)?

Thank you for the answers and all the help!

1 Reply

Hey there -

The best way for me, personally, to answer this question is to give you the way I would do it myself - which is by following the documentation we have written up on migrating to Linode:

Migrate from Shared Hosting to Linode

The beginning of that guide suggests lowering the TTL for your site's domain so as to have minimal impact on your site's visitors. Once you have that done, set up the framework on your Linode (LAMP stack, etc) and the mail server.

What should I do next? Can I have an SSL certificate on my new mail server while it's not live and when the website and their current mail server is running on another server? If yes, how?

You'll want to set up the new site and DNS before you add the SSL certificate. I'll explain what you need to do to have your DNS configured properly below, but here's a couple of guides that explain the basics:

Hosting a Website on Linode

Secure HTTP Traffic with Certbot

What my DNS records should look like on my current linode? MX records are fine, but do I need the A/AAAA www records in there? or domain.com records?

You do need the A/AAAA records configured. Make sure you're following the guidance in this post when setting up your DNS:

Configure DNS for your Linode

I hope this helps. Feel free to respond with any other questions or issues you run into. I've gone ahead and added tags to this post to give it more visibility to the Linode Community.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct