Adventures of a DIY mail server

Hi all, I know running your own mailserver is not “worth it” in 2020 and is generally “uncool” but I wanted to give it a try since I wanted to know 1) if I could do it. 2) If It is worth it or not.

I did have a mailserver running about a year ago and at least that could send/receive mail generally ok. Fast forward to 2020 and I decided to run mailcow in docker since I’m switching some things over to docker for easy upgrades/backups. Mailcow I believe is a good well documented offering, it has a web interface, relatively easy to setup and I like the gui. It has detailed instructions on dns records and how to set it up. I really was able to spin up the server in 5 minutes and configure it for my domain fairly easily. Adding inboxes, 2FA etc was super quick and painless and I felt that solution was secure. The client was discovered in IOS and mail apps easily and was configured easily.

the next few weeks I had been tinkering when I had time 1-3 hours a week trying to get this to work. I didn’t need mail right away so I decided to tinker

Weeks 1-3: Getting a clean pass with DKIM. For whatever reason I setup the DKIM keys properly to documentation but I noticed that mail tester was not liking the DKIM. I used another testing tool and it also flagged DKIM as being wrong and whenever I sent an email it either hit spam or was autoreplying back to the server. All other records and metrics returned fine in mail tester and had a decent score.

Weeks 4-5:

I played with DKIM off/on but the bit depth of DKIM key I found was not supported by anything with 2048 bit encryption so went down to 1024 and also changed my DKIM record to another format. Boom I was able to get email sent to gmail and working fine without spam. However. outlook and other emails I have did not work.

Week 6: I ran through every mail tester app I could and everything came back clean, no block lists, no flagged spam etc. However I was never able to get email to go into a microsoft system and work. This is basically the deal killer. From what i have read digital ocean is blocked by microsoft and its almost imposssible to get it unflagged. which really hurts my business use case of the mail server.

So I could go with a SMTP forwarding service like sendgrid etc. However the mailcow gui is just OK and it has basic calendar, contacts etc in it. nothing special.

Cost comparison.

Digital ocean VPS 20$ CAD a month + SMTP relay + Backup 5-10% a month + Self managed complexity.

Vs.

GSuite (Google Workplace)

15$ per user a month

but has no IT management complexity, an awsome suite of software that can be used in business, and enough space for my small organization to handle. It’s a clear winner. I could even get 0365 for cheaper per seat but I perfer the google offering.

It’s sad that microsoft blocks a large amount of email from self hosted servers now. It’s just not viable for someone who wants to have a business run smoothly and only needs a handful of accounts it just seems silly and unproductive.

I know Tom is going to say “I told you so” but I wanted to go through this exercise and see if it was even remotely productive to run a mail server yourself in this day and age. While you could conceivably do this with an SMTP relay its not worth it in my time to troubleshoot the inevitable issues with this kind of setup to take it seriously. Hope someone may find this useful. It improved my knowledge of DNS and email servers and how generally email works so it was valuable learning time for me but it is overall not practical.

1 Like

If you were going to do this would you need the $20 vps, could you do it on a smaller cheeper vps?

If you receive more than you send, you can keep your local server and use Amazon SES SMTP endpoint for sending mail. It will be cheaper than G Suite and VPS. They give you an IP with good reputation for sendong mail without getting flagged as spam.

For mailcow you need a 15-20$ CAD VPS to run the server + spam filtering + antivirus. If you turn all that off I could not run it on a 5% VPS I needed to go to a minimum 10$ for web gui to load.

Spectre, I hear you but at end of day I would end up with a DIY solution vs gsuite which gives me storage space, easy IT to manage etc. It would make more sense if I had lots of mail accounts but at most I will only have 2-3 for next year or so.