Well, once again, this isn't something I expected to be writing about but here we are!
So if you've read any of my posts, you'd know that I self hosted my own mail server. At the time of writing, that server had been online for 2 years. I first installed it in 2018, and it's done well!
Now, the main question here is why I've decided to migrate it, and where to?
So let's look at the pros vs cons of self hosting your own mail server:
- First and foremost, it teaches you so much about how email deliverability works, and how temperamental it is.
- Increased privacy, the emails reside on your server that you control. No one else has access to the server (If you've set it up correctly)
- As many accounts as you want for the price of the server per month
This is nice to have, you can give friends and family email accounts and the milboxes can be as big as you want - Faster release tracks - Seeing as you're self hosting the server, you can upgrade and install new software when ever you want
- Flexing rights, being able to tell people "Yeah, I host my own email server"
There are more, but this is all I can think of at the moment
Now lets look at the cons
- Reliability - If your server goes down, your emails aren't accessable
- If your server goes down, you cant access emails
- You are the only support staff for your email domain
- the amount of hackers and spammers
- Hard to secure properly (it can be done, but it's a never ending road of "what if I enable this"
- Sender score - How will gmail office 365 etc inbox your mail (spoiler: spam)
- Updates sometimes break things
- You're responsible for good backups
Once again, there are many more, but these are the main ones I can think of
As someone who hosted their mail server for 2 years, I think I have enough experience here to say it was fun, but the novelty wears off after about 6 months. Let me detail some of the issues I had:
- IP address was blacklisted, provider wouldn't change IP address
- Provider had to be convinced to open port 25 etc
- Certificates that auto-renew, you need to restart postfix
- Stopping and starting your mail server each time you make a change to the config
- Log files aren't always useful and sometimes lead you down a rabbit hole
- Lots of things to customize (and then break)
- Server reboots would cause bounces in mail
- Sender reputation was hard to get right
- Inboxing was a nightmare on both google and microsoft
(If someone from ms or google is reading this, fight me, 1v1 me in club penguin) - Emails would have weird formatting, attachments wouldn't display correctly.
Now I know from this article, it looks like I've spent most of the time taking a dump on hosting your own mail server, and whilst that is true, I highly reccomend it. If you or your team are responsible for emails, be it spam filtering or office 365 - You should run your own mail server.
Running your own mail server is great, albeit a little annoying and you need to be on top of things like backups etc, the learning is great!
In my opinion the best place to run your own mail server is for internal only use, so this could be you testing zabbix integrations, or just having an internal mail system for your IOT, or your team to shoot the shit at work and play.
Cost
I was running my email on Digital Ocean for 2 years at $6 a month, which at the time of writing this (aug152021) it's around £4.33 a month for a server where as Office exchange online plan 1, is £3.60
2 years running cost of Self hosting: 103.92
2 years running cost of M$ hosting: 86.4
Savings by M$ hosting it: 17.52
Whilst the 17.52 doesn't really seem like a big number, when we look at the hours it took to get working, we're looking at around about 80 hours over the 2 years, and considering I charge $17 per hour for contracting, that's $1360 worth of charges
vs
2 hours setup on Office 365: $34
Closing notes:
Despite the higher cost and time taken to self host, I highly recommend it, most blogs will tell you don't do it, but I really think this should be every sysadmin's weekend project! It's fun and something usable!
As always, you can contract me if you want help or contact me