If I copy my droplet to a new one, what happens to my mail server settings?

September 4, 2018 624 views
Email

Firstly, can I say that Digital Ocean has always been very helpful to me. Secondly, please be advised that my IT knowledge is at a dangerous level. This means I am totally confident that I can blow my 10 year old website up with one wrong move. Yikes!

While the website is free for the user, it’s cost me a fortune. I just wanted to help people brew beer but the last years seem to be spent just solving IT stuff :)

I’m working on a complete site rejuvenation and name change. About a year ago, DI dropped their prices a lot and I was excited about this as I thought I’d be able to buy several droplets and use them for testing, backups etc but…

My current droplet also acts as a mail server. I can’t remember how I even managed to set it up but it was incredibly difficult. (I remember weeks of study and having to write to Google, Microsoft and many other organisations to ensure my mail server was “trusted.”)

Atm, my droplet costs about $20 per month but with the new pricing, I could run three or four which would be so helpful.

From what I have studied though, if I just copied my current droplet to a new one, I would lose all my mail server settings (MTX records from memory?) which would mean I’d lose all the “trust” I’ve built up as a mail server.

Is there some way around this or should I ask DI directly for help?

Many thanks,
Pat

P.S. Please accept my apologies for my atrocious lack of specialised IT knowledge. In the last years I’ve, unwittingly, had to self-learn a lot of IT stuff across a huge range of specialties - way to hard for one person. If I can create more droplets, I’ll be able to get some help without fear of blowing the current site up.

4 Answers

Hi @patrickhollingd!

Before suggesting a line of work or maybe a set of activities, would you like to give us some more information and context on your situation. I understand that you have a single droplet that is your mail server and also your web server, correct?

And you would like to migrate those services into a better and more efficient setup, correct? While also maintaining your emails, good email server reputation and other things that once did when setting up the server?

Warm regards.

Thanks @mauriciolazo28,

Yes, atm, everything is in the one droplet - mailserver, main site and test sites (phpbb forum software).

Ideally, I’d like several droplets, one for the live forum, another for testing and perhaps, in the future, a third for backups and the mail server.

My thinking is that the first step needs to be changing my current droplet, 2GB/30GB Disk at $20 per month, to the newer the newer 2GB/50GB droplets at $10/month.

Second step would be to copy that droplet and do testing on that. Also, if I assign a floating IP I’m guessing if something catastrophic occurrs, I should be able to switch the floating IP to the test droplet pretty easily, except…

The real problem seems to be the mail server part as, from memory, the mail records are set by DI and are based on your droplet name so I’m tied to that name and therefore droplet for life :)

(As a matter of interest, just checked https://mxtoolbox.com/SuperTool.aspx?action=mx%3abiabrewer.info&run=toolpage# and it says, “No DMARC record found,” and “Reverse DNS is not a valid hostname.” Email works though :) )

You might be wondering why someone with such a lack of IT skills set up their own mail server and that would be a very good question! I used to have it running through gmail but the email delivery was totally erratic, often stopping for a month or more. Since I set up my own mail server (with some help), a few years ago, there have been no problems.

I’m devoting the next month (yet another one), to working on the site. As I intend changing the name of the forum, I’d love the current mail server name to change to match it as well. I realise I maybe asking for the impossible here :)

Thanks again,
Pat

  • Hey @patrickhollingd ! Sorry for replying so late. You may not be asking the impossible, but it will be a complex process that needs you to be really prepared beforehand.

    My suggestion for your final architecture would be:

    • One droplet with 1 GB RAM, 1 core CPU and 25 GB disk (main website/forum)
    • One droptlet with 2GB RAM, 1 core CPU and 50 GB disk (mail server)
    • Optional: One droplet with 1 GB RAM, 1 core CPU and 25 GB disk (testing)

    With this architecture in current Digital Ocean pricing scheme, you would be spending $15.00 a month or $20.00 if you add the testing server.

    Regarding your mail server, as far as I know, today everything is based on your security setup instead of your mail records or your IP not being on a blacklist for SPAM (they still use those lists but have less weight on a decision to flag your mail as SPAM).

    Now, onto the actual process of passing from your single droplet to a distributed architecture. The first step would be research if there is a way to migrate your current forum content to another server. If there is, then you need to create thorough documentation of the steps needed, but if there isn’t then it would be time to consider professional services that can help out with moving content manually and recreating the forum in the new droplet.

    In the mail server, it’s a more straightforward process. Do you remember what software did you installed for email? If there is a way to make a backup of the email accounts, mails and attachments then after backing everything up, you can delete the droplet and install a new mail in server in the most recent droplet and then recreate all email accounts and finally restoring all the messages.

    And finally to create a secure group of servers, you need to do the steps to acquire and SSL certificate for free with Let’s Encrypt, then configure all your DNS entries and records to have a tighter security of your content and your emails.

    If you want to venture into this, here are a couple of resources I found helpful for my current setup that my wife business uses. (1 droplet for mail/calendar, 1 droplet for website & CRM, 1 droplet for apps testing):

    https://docs.iredmail.org/install.iredmail.on.debian.ubuntu.html
    https://www.linuxbabe.com/mail-server/ubuntu-16-04-iredmail-server-installation (special attention to the PTR, SPF, DKIM Records, and SSL config)
    https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04

    And finally to ease up the burden of a complex configuration, my suggestion is to use Ubuntu server, Maria DB for database and Let’s Encrypt (certbot) for your SSL config.

    by Mitchell Anicas
    In this tutorial, we will show you how to use Let's Encrypt to obtain a free SSL certificate and use it with Nginx on Ubuntu 16.04. We will also show you how to automatically renew your SSL certificate. If you're running a different web server, simply follow your web server's documentation to learn how to use the certificate with your setup.

Thanks so much @mauriciolazo28 for such a thorough answer. I realise how long such answers take to write.

The advice you’ve given makes total sense and thanks a heap for the links. When I looked for info on this over a year ago, all of it was several years old. All the links you’ve given are very recent.

Looks like I have a fair bit of study to do. I’ll document the process, something I do anyway, and I’ll post back here once I have success.

You asked if I remembered what software I installed for email. It’s pretty much all the software that your iredmail includes but form memory, the person helping me installed them all individually so the link you gave should be a massive help. I also use Let’s Encrypt.

I think I’ll need larger droplets for main website and testing as my current 30gB one is always about 70% full. I’m hoping to use a smaller droplet for the mail server but that’s all okay.

I do use Ubuntu however my database is mysql. You mention Maria DB. I’ll do some Googling on the difference between the two as I have no idea of the difference :).

Once again, thanks a heap and I’ll let you know how it all turns out.

All the best,
Pat

Btw, contacted support after last post above and received a reply within minutes. Changing my current droplet to same size but the cheaper plan turns out to be a simple matter of just powering it down and re-sizing it!!! (Took less than 15 mins to do.)

So, that’s a great relief! Now I can create the other droplets and begin the fun :)

[Note: Tried to mark your answer as accepted but the “Mark as accepted” button is appearing beside every post except your last one??? I also see now why you suggested the 2GB droplet for the mail server ;) ]

Have another answer? Share your knowledge.