Personal Mailserver Hosted on EC2
In late 2018 I embarked on a project to build my own Ubuntu, cloud-based, email server. I started this project because Rackspace’s email hosting is a SPAM magnet and they don’t really care to do anything about it. SPAM was so bad there, that weeks after I migrated the MX records away, SPAM was still pouring into the mailbox at Rackspace (which means spammers were handshaking and then running through lists of email addresses to deliver SPAM to, a problem I see on my current box, but connections gets kicked after a couple of failed address attempts). When I talk about a SPAM problem, I’m talking about hundreds of messages a day into the junk box with 1 or 2 legitimate emails getting buried within, and a dozen getting dropped into the inbox. It was bad BAD.
I no longer wanted to spend an hour a week sorting through all of it to see if I missed a legitimate email. Looking for an alternative that wasn’t Gmail or Outlook, there really were no good options I could find that showed promise in terms of spam filtering, mailbox numbers, and cost. I did toy with the idea of paying for a spam filtering service to sit in front of Rackspace, but those costs started to add up to where hosting my own set of servers would cost the same. So I decided to see if I could roll my own.
At first, I thought I was going to have to build everything from scratch, learning all the various applications and piecing something together. After many, many, … too many, hours of searching, I stumbled on the ISPmail guide at workaround.org. Using this guide, some extras I threw in for features I wanted, and a couple of AWS EC2 instances, I was able to build a mail server (and backup) to host my primary email domain at gleicher.net, as well as all the other personal domains that I own.
Because I adapted a few aspects of the guide, I’d like to take a few posts to talk about what I did, where I veered off the path of the ISPmail guide, and some of what I did within AWS for backups, computer/storage, security, and the ever-complicated SPAM control. A word of warning as well. Like almost everyone out there says, running a mail server is not for the beginner and in almost every circumstance should be avoided. I spent a lot of time troubleshooting configuration changes I wanted early on, and hours tweaking and reviewing SPAM logs to ensure everything got to the right place. I still have issues with mail delivery with the biggest mail providers, because the big guys don’t like IP addresses from cloud hosting provider. It’s easier for them to just drop the little guys hosting from cloud providers, than it is to dedicate the computational power to sort through the SPAM that would otherwise get delivered. I could write pages and pages about how all that SPAM would be easy to filter and help with overall SPAM algorithms, but I barely was able to find someone at Microsoft willing to delist my IP address. I’ll talk about my workarounds and give some hints on how to get un-blocked later when I get deeper into the guide.
For now, I hope to roll out more posts in the coming few months!