A while back, I wrote "Why self-host?" and explained why it was the wrong question. This inspired my friend Otso to actually deep-dive into self-hosting, to expand on his skillset, and he's now reposted that article on his own self-hosted blog that he's built with his newfound knowledge.
Otso basically took a class on "how-to become your own sysadmin", one-on-one with me over a Discord call where I shared my screen. The place that I host my servers is so bare-bones that all you get when they fire one up for you is SSH access for a single user - on your choice of Linux flavor. Linux is like Baskin-Robbins, it has more than 31 flavors.
I helped him fire up a real hardware - not vaporware - server in Kansas City and then rapid-fire shouted out the Linux commands as I did them, and what they meant as I went along. It looked a little something like this:
I created some users, and installed some useful stuff - then I basically left him to sink or swim, and somehow, he swam. Lord knows it's not thanks to my skills of being pedagogic which are non-existent. I had to assist him with an issue for a little while I was riding in a car to see "Guided by Voices" live in Dayton Ohio, where JuiceSSH came in handy. Shoutout and bless all the people who make useful apps like this or I'd literally never leave the house! I used to babysit other sysadmin servers for fun.
(I should tell you the story of when my good friend Mr. Bill babysat my servers as I was on a long-haul flight and he accidentally deleted a partition that I really needed, which we fixed while I was waiting for a connecting flight in Toronto, someday - but I digress.)
Anyway. I've always learned from my mistakes, and have figured out most of what I know by either picking things apart and putting them back together again or accidentally breaking stuff that I then need to fix. Mom had this taped on her fridge with my name written over it for years.
With the newly kindled interest in Why this self-hosting idea, I asked myself "why not self-host email servers?"
After all, I have hosted my own sendmail and postfix servers before, decades ago. I was the Sendmail server and the DNS server not just for myself but also for some friends. After a few very stressful times of massive spam waves where my "access file" basically looked like angry Bladerunner poetry in the way it personally told certain IP# numbers in Korea and specific email addresses off, I realized that I didn't want to feel like I had drunk the intergalactic gargle blaster cocktail every evening, and switched to much less masochistic "Postfix". Yes, you could still use it today if you want to self-host your email server. (If you do, please become acquainted with SpamAssassin to help stop the onslaught of spam, it became a full-time job around 2004, even if you wrote serious helper scripts.)
What spurred me even further was that my now grown offspring got a little agitated that I, as the "root" of everyone's email, changed some spam rules on her domain specifically - which made her think that I had read her mail. As a rule, root does not do that. Because root can fuck with you without reading your mail. Anyway, she demanded to be her own email master and I thought that I'd drop her in the deep end to see if she could swim too.
I've actually used Rackspace for many years to avoid having to run my own email servers, but that used to give me enough access to add my own whitelists and blacklists, and I could even have "catch-all" domains. I was grandfathered into such an old contract that the number of domains (and users) was irrelevant to the monthly bill - but this all changed when Rackspace moved to Microsoft 360. No more "catch-all" domains"! Oh no.
I was even good friends with people who worked at Rackspace because they were actually "fanatical support" people, and I would chat with them both as the "brand" and as the individuals that they were on Twitter, back in the day when not everyone was an "independent journalist" or troll of some sort. They were nice people! I'd write them a LinkedIn recommendation!
But alas, that is no longer the case - so now I had to find a spot that did all that and was easy enough for offspring to be the admin of, so I could set her in control of all of her things for her teenage "privacy" reasons. So, I found Zoho and their "forever free" plan. This won't include pop or IMAP, so if kidlet wants that she'll have to pay gasp a dollar a month.
It was so easy to export all of her mail and set it up, that I decided to do the same with every domain and email account I had on Rackspace, as on Zoho I could buy big fat 50 MB accounts for certain emails, and leave others at the very inexpensive 1-dollar a month.
I moved everyone and every account that they had on their domains, very quickly to Zoho. It was kind of fun for a minute there. I was on a roll!
Then I thought, ah, finally - let's move the hostmaster of adland.tv, the biggest and most painful account and domain that I handle. The one that nearly cripples my home server and computers because I literally have to keep every damn email it ever gets, in case some jerk decides to close the site down decades after an ad has been posted. (cough - Amy Tindell at Holland & Hart LLP - cough.)
So, I begin with the Zoho process of creating an account, signing in with email. "hostmaster" and "adland.tv"
Zoho informed me that I had created the account nine years ago. What?
Oh, that's right, some PR guy sending me info and releases also invited me to a calendar so that I could keep track of whatever they were doing. And as the recipient of such crap, I probably have an account everywhere with this email.
But as I attempt to open a mailbox, I get this warning:
"You can't open an email account until your ADMIN releases you from this."
Wait, admin? By joining whatever calendar this PR guy shared with me, I made him the boss of me? This ain't right. So I contact Zoho mail, twice, through their ticket system. I explain that this "admin" name@domain has literally nothing to do with me, and the "admins" domain hasn't even existed for nine long years, so please release me from this idiotic cage. After no responses, I have to log a "chat" within a specific area and wait for a response that will be emailed. "Fanatical support" it ain't.
Zoho finally responded that I should rebuy the domain that the "admin" abandoned nine long years ago - I mean, I'm sorry, what? - and then give me access as a user to the admin status.
This response was so dumb that I stared at the screen for a few minutes wondering how fast I could move all of my users to another mailhost again. I mean, I was leaving Rackspace because they are not doing their fun "fanatical support" any longer. In fact, you should count your blessings if you get any support at all. But getting support replies that haven't even read your question is worse.
I persisted, and Zoho finally understood what I had said - some dude with another domain and account is the boss of everything that I wish to do or open or pay for on Zoho today because you have a really dumb "admin" system where whoever invites whom first, wins. That's how it works! Lord knows why.
That would be yet another reason it's a good idea to self-host. In case you are still considering that masochistic strategy.
Anyway, in the end, I moved all my users to be their own "admins" at Zoho, leaving them to choose what levels and add-on apps that Zoho has are useful to them. I am no longer responsible for a baker's dozen of people's emails with a dozen different domains and that feels pretty good. (I do handle their domains though. We'll talk about BIND9 some other time.)
So you still want to self-host your email?
If you despite this easy alternative offer, want to self-host an email server, here are my thoughts.
You can configure nginx as a mail proxy server.
You will probably have to use relays for everything outgoing because this is not 2002. If you are literally setting up your mail server on your home server, you will have to make best friends with SpamAssassin. Also, junkemailfilter is a great buddy.
You will need to own not just your domain, but your IP - I don't want to get into how to run a mail server on a dynamic IP ever again 😭! This is PTSD territory.
Your relay options can be really affordable, such as mxroutedocs which can even sell you a "lifetime" version.
Start with Postfix or you will hate the world. I mean, more than you already do.
"Backups? We don't need no stinkin' backups!"
Am still undecided on where I shall store decades worth of emails now. I don't like to pay big money for shit emailed to me back in 1998. I want to keep that in a way that it is downloaded and easy to search on modern home backups - a rare thing.
My problem has always been that some idiot is going to email me about an ad from 2008 and ask exactly who gave me permission to write about that and host the ad.
It would be a lot easier to answer if everyone actually attached the ads, (they never do), and I could download the emails to some cheap hardware that ran a simple email app that could search all of those archives.
Now when I move it to glacier-style storage or on hardware disks I lose the ability to instantly search. And when I keep it on decent places like Rackspace, they have a tendency to change the contracts and prices after a few years. Such is life, and please download everything regularly. RSYNC is your best friend. Rsync everything to your home storage, always.