Nice, I was actually starting to look at centralising my cloud services on an openbsd computer at home, this could do quite nicely.
Warning: every time I see self-hosted email posted to HN there’s piles of people showing up talking about how bad it went. Esp message delivery not being reliable due to both infrastructure issues and blacklisting. It’s often different people saying it, too, which indicates these problems hit lots of people.
It’s not necessarily trivial, but a lot of the people posting on HN with that kind of comment, when you inquire further, turn out to have been doing mass emailing, things like sending out large-distribution newsletters or transactional emails for a webapp. Deliverability for that kind of email is a whole different ballgame than just running a private email account.
For what it’s worth I’ve hosted my own email for about 5 years now and haven’t had any problems.
There were also people that said it worked out fine for them. Just really hit and miss compared to self-hosting a web site or something. Email is often used for important stuff, too. I thought I should give a warning for that reason.
This is a legitimate concern, to which I would like to add my anecdote.
I did the following for my personal email address, while looking at what signals rspamd uses for classification. I noticed that replying to a message will lower the spam score, as well as whitelist that message type if configured so.
Moreover, a similar mechanism exists in Protonmail’s Spamassassin configuration, as well as Gmail’s own Bayes classifier. This can be seen by inspecting X headers.
For this reason, I asked real free-email users (from my address book, not create accounts on free-email just for this) to send me a test email, to which I replied. From then on, my emails have negative spam score on Gmail and Protonmail. I will test with Outlook soon.
I don’t have any experience hosting multiple users, because it’s a different game involving privacy laws, tech support, and blacklist politics mentioned in other self-hosting email threads.
Edit: spelling and coherence (sry)
I’m not sure yet whether I really want to do email yet, but I’ll definitely be moving http, git and a few other things. In the meantime I still have email with posteo and dismail.
This seems really cool. I’d love to have email more under my own control. I also need 100% uptime for email though, so it’s hard to contemplate moving from some large hosted service like Gmail.
If email is that important to you (100% uptime requirement), then what’s your backup plan for a situation where Google locks your account for whatever reason?
Yeah, that’s true. I mean I do have copies of all my email locally, so at least I wouldn’t lose access to old email, but it doesn’t help for new email in that eventuality.
Email does have the nifty feature that (legit) mail servers will keep retrying SMTP connections to you if you’re down for a bit, so you don’t really need 100% uptime.
Source: ran a mail server for my business for years on a single EC2 instance; sometimes it went down, but it was never a real problem.
True. I rely on email enough that I’m wary of changing a (more or less) working system. But I could always transition piece by piece.
If you need 100% delivery, then you can just list multiple MX records. If your primary MX goes down (ISP outage, whatever), then your mail will just get delivered to the backup. My DNS registrar / provider offers backup MX service, and I have them configured to just forward everything to gmail. So when my self hosted email is unavailable, email starts showing up via gmail until the primary MX is back online. Provides peace of mind when the power goes out or my ISP has outages, or we’re moving house and everything is torn apart.
That’s a good system that seems worth looking into.
Note that email resending works. If your server is unreachable, the sending mail server will actually try the secondary MX server, and if both are down, it will retry half an hour later, then a few more times up to 24 hours later, 48 hours if you are lucky. The sender will usually receive a noification if the initial attempts fail (and a second one when the sending server gives up)
On the other hand, if your GMail spam filter randomly decides without a good reason that a reply to your email is too dangerous even to put into the spam folder, neither you nor the sender will be notified.
And I have had that issue with GMail, both as a sender and a receiver, of mail inexplicably going missing. Not frequently, but it occurs.
There’s some nice bits and pieces in there I might use in my new mail server setup! Thanks for sharing.