Skip to main content

Part 18: The mail that answers to no one

TL;DR

  • Stalwart runs my email: open source, which I financially support, and honestly the best mail server experience I've had - a comprehensive email solution with all the modern bells and whistles, trying to give people and companies what the big providers gave up on.
  • Email at home means full control: encryption all the way, retention under my own policy, and no corporation mining my correspondence.
  • DNS stays external and is not hard - though I still see a few gaps, nothing a good sysadmin can't sort out.
  • Next chapter: networking, the layer that makes all of this reachable without becoming reachable to everyone.

Why email is the line I wouldn't cross

There's a category of self-hosting that is a hobby, and a category that is a statement. Email is the second. You can run Nextcloud, Jellyfin, Gitea, a wiki, half a dozen dashboards, and it's a better alternative to their cloud equivalents. But nobody mines your data out of those services with the same commercial appetite as your mailbox. Email is where your life's correspondence lives: confirmations, contracts, medical reminders, the account-reset links to everything else you own. Delegating it to an advertising company has always been the part of the "free" internet that made me the least comfortable. So email is the thing I kept for myself, through every platform this blog has covered - Proxmox, the Pi-and-NUC era, the McGyver cluster, and now this one.

That has a cost, and I want to state it honestly: self-hosted email is the single hardest service to run well, because the failure mode isn't your server going down. The failure mode is other people's servers deciding they don't trust yours. Deliverability is a social system wearing a technical costume - reputation, DNS hygiene, SPF, DKIM, DMARC - and you inherit every mistake your IP range ever made before you moved in. This is why most people's sensible advice is "don't." Mine is: don't unless the reason matters to you more than the friction. For me, the reason is the whole point.

Stalwart, and putting money where the dependency is

The mail server itself is Stalwart. I evaluated this space the way I evaluate everything that ends up on critical infrastructure, and Stalwart won on the things that matter at home: it is one binary doing SMTP, IMAP, JMAP, and the web admin, with built-in spam filtering, full-text search, and modern authentication - a comprehensive email solution with the modern bells and whistles, rather than a 2005 MTA held together with a decade of config fragments. It's fantastic, I love it, and I've watched it mature the way you watch something you depend on: closely.

One thing worth doing, because it matters more in this stack than in most: I financially support Stalwart. It's open source, it's the load-bearing wall of my correspondence, and the project is trying to give people and companies a real alternative to the big providers. When a single volunteer project carries that much weight in your life, the license being free is not the end of the transaction. It's the beginning of the bill you should be paying anyway.

Where it lives, and how the pieces connect

In the cluster, mail is a first-class tenant. It sits on the critical storage class from the storage map post - Longhorn PVCs at RF=2 - because an hour of mailbox unavailability is an inconvenience, but an hour of lost mail is a permanent wound. Post 12's war story about database restores exists in large part because mail was the workload I was protecting. Stalwart's data model treats messages and their indexes the way CNPG treats pages and WAL, and the same discipline applies: the live data is protected, and the restore path is drilled, not assumed.

DNS is the other half of the story, and it's the part people overcomplicate. My DNS management is external and not hard: the standard records - MX, SPF, DKIM keys, DMARC, autodiscover - published where the world looks them up, managed where I manage the rest of my zones. There are gaps I still see in that setup, things I want tighter than the defaults give me, but nothing a good sysadmin can't sort out with an afternoon and a checklist. I'll write that checklist up when it's done; it's exactly the kind of page this blog exists for.

The security posture is the payoff. Encryption all the way - TLS on the transport, keys rotated on my schedule, not a provider's. Retention under my own policy: I decide what archives, what expires, and what gets deleted forever, and no terms-of-service change can rewrite that decision overnight. And the quiet part underneath all of it: no corporation figuring out anything I do anymore. Not what I buy, not who I know, not when I'm awake, not which reset link proves which account is mine. That last category is the one nobody prices in until they think about it: your mailbox is the skeleton key to every other account you own, and I'd rather that skeleton key live on my own hardware.

The catch nobody mentions

Everything above only works if the world can reach my mail without me becoming reachable to the world. Deliverability is half DNS and half network posture - the IP reputation, the port 25 story, the question of how a home connection presents itself to the internet at large. That's not a mail problem. That's a networking problem. And networking is bigger than mail: it's the border of everything I've built so far. Every post in this arc eventually asks the same quiet question - how do packets find their way in? It deserves better than a passing mention.

So that's the next chapter, and it's a long one: three posts. First, Cilium - the network fabric itself, and why eBPF plus BGP support is what drew me to it. Then, ingress with Traefik - the front door in the proper sense. And finally, Tailscale - how the estate follows me out of the house without me becoming reachable to everyone.

The border of the house, drawn properly. Three times.