I ran my own self-hosted email server from 2008-ish to 2018, and I would highly recommend against doing it! Especially when Fastmail and Proton are so cheap.
I was running Postfix+Dovecot+Seive+SpamAssassin+Fail2ban+certbot+spf+dkim+reverse-ip+<other random crap>
It worked! Receiving email was overall pretty easy. I know I also did things the "hard way" by ad-hoccing all that together, and today there are a lot more out-of-the-box solutions that do all that for you. But still. Being a full-time email administrator is a job I will never do again unless I'm getting paid for it.
You know what really sucked? Deliverability. Frequently, emails I would send would just ... vanish ... no warnings, no errors, no failures. From my end, everything was perfect. Until days later, people would follow up with me and say, "Are you going to send that email?" ...
I had a business IP (Comcast Business). The IP address was clean, not black listed anywhere, not on SORBS or other lists. Still, successfully delivering an email was like 50/50, with no way to confirm the other party actually got it.
Had no problems at all self-hosting for two decades; then a provider went bust and I lost my static IP block, and with it its two decades of reputation.
I still self-host, but now I cheat for deliverability: route the problematic destinations (I'm looking at you, Outlook) through Amazon SES. At a few cents for five-figure numbers of emails, it's as close to free for personal/vanity email quantities as it gets to have someone whose full time job it is to make sure outgoing mail stays deliverable on your side while still keeping everything else under your control.
One thing to note is that Amazon are not very good at keeping amazonses.com up to date, so despite including it you can't set DMARC to hard-fail SPF or you will have mail bounce days.
I'm running 4 email servers, the oldest is from 2011 or so, to this day.
4 different countries, different AS.
I'm always puzzled by all the issues described by others. I had about 4 issues during these 15 years, all 4 were solved by reading the bounce message and doing what was asked in the message (contacting support of the destination).
Same. People just remember it's hard because they don't test, don't like responsibility much and esp. because they test this in production not on a spare domain. Then all you remember from it is the 10 people shouting at you and that you need to fix it NOW and it's all super stressful so they never attempt this again.
A lot of the people who complain that their emails were treated as spam when they tried self-hosting leave out that they were really sending unsolicited commercial mail.
For personal email, self-hosting is much more manageable. Typically GMail will send those messages to spam at first, but after a few different mailboxes have clicked “not spam” GMail learns the lesson.
Yes, I do something similar (with Amazon SES in my case) but only for domains I know are problematic (Microsoft-hosted domains are the main difficulty - I've never had issues with eg Gmail).
As someone with a personal email on a Microsoft domain, I support this message. Microsoft is the worst. I regularly find that mail I should have received just never arrives.
If they would at least dump it in the junk mail folder, I could fix it, but no, some earlier step in the process makes it silently disappear.
Well, generally you need 2 different programs regardless. Usually an SMTP server for accepting and storing emails and a IMAP server for clients to connect to and read stored emails.
For the parent post, you configure an outgoing SMTP relay
You could do it any way you like, but it you have your own mail server, just configure it to route specific recepient domains (or all domains, this is called a "relayserver" in the postfix documentation) to a specific mail server. Just remember to flag your desired outgoing mail servers as approved for your domain (in the SPF record).
For the end-user's perspective (ie, the dude who just wants to do email stuff with a mail reader like Thunderbird): It's two separate paths, as has been a normal thing for standards-based email for an eternity.
A user's inbound mail accumulates on a mail server. One server [protocol] handles getting the user's inbound mail to that user's mail client -- usually with protocols like POP or IMAP that let the user retrieve that accumulation.
Another server handles whatever mail the user decides to send, using SMTP. Each server is configured within the user's mail client, and that's just the normal way of doing things. It's ~always been split up like this (aside from outliers like Microsoft Exchange). :)
The user doesn't have to know anything about the existence or addition of a system like smtp2go. They just configure their client to send mail through mail.orgname.com (or whatever) like usual, and the back end handles the rest. Their pop/imap server address also stays the same.
---
Anyway, mail servers and relays. Mail servers don't talk to eachother using things like POP or IMAP. The traditional Internet way for a mail server to send mail to another is to look up the recipient domain's MX (Mail eXchanger) entry in DNS, which specifies the inbound mail server, and just send it over using SMTP.
It was thus delivered. It was all very trusting.
That trust began to break when spam became a problem that never went away. Requirements and reputation and filtering became a serious ordeal for mail servers -- both on the sending and the receiving side of things.
Services like smtp2go can handle part of the sending-side trust-wizardry in a centralized way. They do things like maintain the reputation of their IP addresses.
In using it like this, orgname's server (which might very well be under someone's desk) ceases to directly connect to each and every recipient domain's MX.
It goes through smtp2go instead: All outbound mail simply gets routed through smtp2go, as the result of a central back-end configuration thing on orgname's mail server.
In email terms this is called relaying, though smtp2go might prefer the term smarthost[1].
Meanwhile, local internal mail (from joe@orgname to jill@orgname, say) can just get delivered locally. It doesn't have to be relayed at all. This determination is made by orgname's mail server.
And, again: The user doesn't need to know or care that their mail is/isn't being relayed, and the concept of relays themselves is as old as the hills. The user can just be happy that their mail gets where it needs to go instead of being silently dumped into a ditch, and they don't need to do anything different on their end for this to happen.
It's moslty due to how the protocol works. Sending and Receiving are asynchronous and may or may not follow the same path.
When sending the other side is the server, when receiving, you are the one. The protocol also has the concept of relaying, where message can go trough intermediary nodes.
So you can set one server for receiving email (yours) and another one for sending (smtpgo).
For actually reading, the server for receiving need to deliver the message (either built-in feature or through a program) to the correct mailbox. That would probably means writing it on disk somewhere. And then you need to use a mail user agent (MUA) to read that file. Protocol like imaps and pop3 are for transfering your inbox to another computer, not for receiving or delivering email.
Same story. Ran a set of about 20 postfix mail servers for my company. Prided myself on being proactive, setting everything up correctly. Using things like DANE even before they were mandatory but the trouble was always random blocking which was outlook.com 90% of the time and occasionally yahoo and Deutsch telekom. At least the latter provided contact details and were helpful getting things unblocked but Microsoft had horrific support. You are blocked, we won't or can't tell you why, nothing in the mail management system shows you any problems so we can't tell you what to fix, please see this 15 year old guide as to how to setup email properly and we will tweak the setting a bit to let your mail through until the next time we decide to block it.
So frustrating because they have no legal obligation to accept our emails but our product relies on them being delivered.
There used to be some web form for msn/Hotmail/outlook you could submit your IP to and 1-6 months later it would magically start working _most of the time_
A lot has changed, in fairness. Stalwart + LLMs can help with the full-time email administrator part. It's a lot easier than it was.
And on the deliverability side, using SES for sending avoids this entirely. Yes, ok, not fully self-hosted I suppose, but it's close enough (and for most people, the bill will be pennies).
But I encourage everyone who likes tech and freedom to host their own email. So many reasons.
Some are pragmatic, for example that way you won't ever get locked out suddenly of your entire digital existence when google/microsoft decide to lock you out for no reason and you will never reach support capable of helping.
Some are more about taking a stand for freedom, but that's also worthwhile. The internet was not meant to be owned by just a few behemots who get to control all content. The internet is about distributed peer to peer protocols. Nothing embodies that better than everyone running their own mail server, if you can.
As many say below, if you're worried about the deliverability you can still run your own email server and have nearly all the benefits even if you use a third party relay for delivery.
That said I also deliver from my email server and it is totally fine, the fears are overhyped. Delivery to microsoft is the worst, but even that one just takes filling a form on occasions (been over a year since had to do it last time).
I think the timeline is critical here and should be highlighted. Self hosting email server was something that worked out just fine in the past (used to host until 2014), however things have changed a lot with the scale of abuse. its not worth it unless you are doing it as a business. Sending a email from your home IP to big email providers with reliability is next to impossible. Even if we discount the spam management,
1. IP reputation is a big deal, its not just about not being on some blocklist, call it a cartel at this point, its about being on the allow list for other mail providers
That's not been my experience. I've been selfhosting email on a small provider VPS for years, never had any deliverability issues that I know of. I've set up DKMS, SPF..etc records properly and I send maybe a dozen emails a day at most.
This seems to depend so much on the IP address space one is in. I have never experienced deliverability issues after the first year–and that's since the 2010s iirc. The first year I had to ask several friends to send me emails first, or dig out my email from spam and reply to it. After that it worked flawlessly for Gmail, which was hit-or-miss before. A single ISP I had to write to manually–the person responding to my mail explained that they blocked emails from my hoster's IP range wholesale but made an exception for my IP explicitly.
Never had any issues since then, though I did have to adjust to new standards such as DKIM, DMARC, SPF etc. over the years.
I run self-hosted email for more than 80 domains across three VPSs, almost all of which are one-offs or joke domains and then a handful of old and new personal and business domains.
No deliverability problems. The issues with self-hosting email are drastically overblown.
you can check your delivery rate with services there are lots that are free to check and they also offer to "warm" your reputation. I have not done that yet (money!) and outside this:
- Outlook.com consumer mail addresses
you can still get >99% delivery rate if you have spf, dkim and all the new cool stuff.
So no, please DO NOT recommend against doing it because ONLY if mail stays a decentralized service providers will stay forced to not blacklist everything but other large providers.
Easier to self host inbound and relay outbound. SMTP relays are effectively a commodity and pennies for personal usage. Worth <$1/yr to not screw with IP rep unless you own a /24. Less than /24 you risk some knucklehead getting the whole block listed
I used to run mail servers for a university and I also suggest that no one should do this. It's hard enough to get right when it's your full time job. No one wants that kind of headache just for an email address. Do what I do and pay for Proton and stick your domain on it.
Running your own email infra is not at the same level as the usual “self hosting”. Not to mention that email can be critical and missing an important email can burn a lot. Why put in that much effort on your free time, and take the risk?
You don’t build your own fridge. If it’s important and not your strong suit, pay someone to do it for you.
You’re missing the point because you’re thinking like a techie and not like a regular user. But to answer your question, 100% with 0 effort and also 0 direct cost.
In my professional life I managed email infrastructures since 20 years ago. It only got harder.
Oh im sorry i had no idea to talk to other hackers i have to go to usernews.com obv. when this is the wrong place to think like a techie.
If you achieve 100% delivery rate you will surely share the results, right? No? Oh i guess all those services simply tell you they make it easier for you while not actually achieving that - but why check?
I have had my own e-mail server since 2017, and there is only one instance where I know I had a delivery problem, and in that case it was funny, because I wrote to two people who had the same e-mail server, and one got the e-mail the other did not. So probably a SPAM issue, but certainly nothing my e-mail server could have done better...
AFAIK, that case in 2019 was the only time an e-mail went missing.
Proton doesn't really host a standard email server like imap for you to access on the client side. You have to bridge/proxy/translate it. And Proton doesn't offer any of the convienences like distribution lists that you expect for the past 30+ years.
Yes I figure if I’m going to pay someone to resolve a domain to an IP address I might as well pay the same person to operate my mailbox. Having clients that sync the mailbox offline is “local” enough for me.
Will second this, as someone that took the same path. Alternatives like Fastmail are so, so cheap when compared to the headache of building, maintaining, and troubleshooting a DIY stack. For something as fundamental as email you really want to choose the solution that gives you NO problems, rather than some solvable but troublesome problems at regular intervals.
Just too critical of a component in most people's lives to accept any level of unknowns in.
That's cheaper than I can rent any mail-capable VPS for, and it's cheaper than the electricity I'd pay (80W @ $0.15/kWh = $316 over 3 years) to self-host.
And that doesn't include my personal-time hourly cost.
I'm not saying that a person should undertake hosting their own email here in 2026, but: 80 Watts sounds like a lot for a personal mail server.
The last small-corpo email server I ran myself was a Pentium 4 box that worked for eons. It did all of the things (the spam filtering, the virus scanning, the tossing, the software RAID storage, the open internet-facing ports including the webmail) for all of the people.
But it turned out that even with dozens of users, it hardly ever saw any load. Email was a complete snoozefest for it.
I'm quite confident that an N100 box would run circles around that P4 machine using any metric, and use an average of less than 10 Watts if all it needs to do is serve mail at home.
Before self-hosting your own, first get a domain and just point it at a mail
provider that allows custom domains. It will cost, but so will a VPS. I suspect
a lot of DIY homelab types would have most of their needs met with just that
setup:
- you get the vanity email address
- you can switch email providers (including self-hosting later on)
- you can have ~unlimited aliases (depends on the provider)
Most of the setup consists of steps you will have to take anyway when
self-hosting (getting a domain, changing DNS records), except for a major amount of
headaches that will be taken care of for you.
Agreed. Never use a provider-specific email domain, when for a tiny amount per year you can have an email at your own domain that stays the same no matter who your email provider is.
I do. It's nowhere as hard as everyone on here makes it out to be. And I don't even use an easy solution like Mailcow.
Spam is a solved problem with rspamd, and it's not even an llm
I’m wondering what the most fool proof way to get a message delivered to someone else is. I found out today some SMS messages I sent were silently dropped. Email doesn’t always get delivered. I would hope the closed ecosystems like Signal and Whatsapp are better at this and in any case you need both parties to agree on a channel. I just like email because my identity is maintained even when I switch providers, and nothing else quite like that exists.
That is the exact problem that got me to abandon my splendidly working, self-hosted email stack. I had so many instances of mail just not getting delivered, despite doing absolutely everything correctly, that I gave up.
Thankfully not a problem we've encountered yet. All my mail is DKIM signed, SPF aligned etc. I also registered on dnswl.org which is a signal quite a few people seem to use.
I still handle email for multiple small businesses (for over 20 years) and recently switched from the mailscanner+spamassasin to rspamd and the scanning is so much better/easier now
my backend is still dovecot+postfix, still works beautifully. I am able to run rspamd+dovecot proxy on a small vps and the storage is handled by a backend office server with dovecot. If VPS has an issue can spinup another easily/anywhere and backend is also virtualized (libvirt) so easily restored (with multiple backups in multiple places)
biggest thing to worry about with deliverability is ensuring your SPF and DKIM (opendkim) are correct, which is not too difficult and rspamd is able to handle the dkim signing/verification which is nice
Yup rspamd being able to do the DKIM signing was what made me move from spamassassian+opendkim to just this single solution. The web GUI and its speed were just really nice extras it brought with it. It's one of my favourite pieces of open source software.
Personal mailserver sorry. rspamd stops all the sent-using-my-from-address "i hacked you" emails (DMARC drops them) and all the other random spam stuff. I can imagine though a large business with thousands of email accounts it wouldn't be as easy though.
I've been doing it since late 90s for several domains, servers run in DCs.
Deliverablity wasn't a problem once I set everything well (and I forwarded most, including received phishing/spam, to my big provider account), but constant fight with incoming spam and effort to keep the servers safe, secure, updated, monitored and finally paid for, weren't really worth it.
For unlimited aliases I bought the service that lets me use my domains, for smtp for servers I was using sendgrid and ses anyway.
The effort is not worth that, especially not with the powerful LLMs looking for vulnerabilities.
I can spend the time I was sinking into keeping it afloat on something more creative.
Even in the face of all the advice on reddit and HN that says never to host your own mail server, I have been doing so successfully for at least 15 years. It helps that I have had the same spam-free IP address for most of that time. All I ever do is run `apt upgrade` approximately once a week. Costs all of $5 a month and there's just enough RAM leftover that I can also use it for wireguard tunnels or whatever if I need to.
I have decided that if my VPS provider shuts down, I can just send my outgoing mail through a cloud provider's SMTP gateway. My volume is low enough that it will be free or cost a few cents a month.
Deliverability is not a problem for me, but incoming spam does not have a great solution. Even with rspamd, a lot of crap gets through if you start spamming your email address everywhere. This is why I use a lot of throwaway and company-specific email address.
If you only have one email address, yeah Fastmail or whatever is cheap. But as soon as you want multiple users (family) and throwaway email addresses, it gets expensive in a hurry. But those are free if you self-host.
I ran my own mail server from 1999-2008, starting when I worked at Sendmail. I helped create SPF and DKIM.
I would never run my own mail server today. Deliverability is a nightmare, despite what this article says. Gmail/Hotmail (and all the domains they host for people, which is quite a lot) will pretty much block or silently drop any email that isn't from a large, known provider who has actually talked directly to them.
If you don't have time to be a full-time mail deliverability engineer/product manager, just pay someone to do it for you.
I know an old-school Linux admin who has been successfully running his own email servers for 30+ years - from small private ones to larger corporate setups. For spam detection he uses his own system, and it works surprisingly well even without any LLM (though an LLM could surely make it even better). So the "you can't self-host email" meme was never quite true - it is about willingness and ability to configure everything right.
I've been self-hosting for 20 years now - a few years ago I switched to using Mail-in-a-Box (https://mailinabox.email/) which makes management a lot easier than configuring each service manually.
It definitely requires some effort but once you've got it up and running it's pretty hands off. The only issues I've ever had are expiring certs but I've fixed that by configuring auto-renewals and it's all good now.
Ensuring your source IP isn't blacklisted is probably the single most important factor. I had to request a new IP from Linode where my server runs as the one it was originally assigned had a bad reputation.
The biggest problem with self-hosting a mail server is reliably being able to send email and have it be delivered to the recipient. Something I have been thinking about setting up is self-hosting a dovecot server so that all of my emails that I receive are on my system, but using another provider for sending email. I don't send that many emails, so there is not much privacy loss in regards to a third-party being able to see my sent emails, but I still get the benefit of noone but me having access to my received emails.
> but I still get the benefit of noone but me having access to my received emails.
Other than every smtp relay hop and any network tap along the way that could keep a copy. Hope you're encrypting and not worried about the envelope. Email is fundamentally not private. Self-hosting doesn't help all that much (though it may keep it out of certain companies' hands, aside from the emails copied to or sent from that provider)
I'd run my own email server since the early 2000's - in several forms over time. A VA Linux 2U rack server that I got from work (noisy, overkill), a personal Mac Mini (Frankenstein macport upgrade-resistant), and now a single-node k8s instance with everything neatly managed (an excuse to really dive into k8s from the ground up).
I use dyndns to handle IP changes (incredibly rare with Frontier FIOS, actually).
I use mailhop.org to handle secondary MX records in case my machine is down (as well as mail filtering)
Everything else is postfix, spamassassin, dovecot imap
It's not a trivial system, and it took a while to get everything working how I wanted. It's a terrific learning opportunity, but it's by no means simple to mentally model the process of all that happens inside.
I've got a private github repo where all of this is documented. I intentionally kept everything that's secret out of there. Will turn it public, now that I think about it. Thanks, friend!
I also run mail servers for others, mostly non-profit adjacent groups who don’t have the capital to be extorted by cloud service providers.
Sure, there are some things to learn, but like anything – if you do it properly, it’s not hard and can work properly. Never had any deliverability issues over that time (yes, even to the big providers). I also almost never touch the boxes (I do about one architectural overhaul a decade and am working on the next right now).
If you’re willing to invest the time and resources to do it properly, I agree, it works fine.
Ive self-hosted my email server since 1999. It started in a closet at home in San Francisco. As things got more restrictive (residential ips being black holes) I moved to a Colo. but now I'm back to hosting it on my server in my cellar. I have a fixed ip from my provider init7 (Switzerland) that has never been blacklisted. Reverse dns is set up. All the acronyms like spf, dkim, dmarc are set up. I have no problems sending to Microsoft and Google email addresses.
So I'm doing it now but I'm ready to switch back to one of my Colo servers at any time and I won't be surprised if I have to at some point.
> but if your home internet checks these boxes, you can 100% host your own mailserver at home:
Static IPv4 address (make sure it's not blacklisted)
Not behind a CGNAT
Ability to change the PTR record of your IP (usually though the support of your ISP)
Ability to open common mailserver Ports (25,143,465,587,993)
Because above is only needed if you want to communicate with people using Gmail, Yahoo, Outlook, Fastmail, Proton etc (The monopoly).
For normal folks, they are better off using an alternate less privileged email service like email.riamu.io.
I guess there is the edge version and more recent commits, and overall it should be stable, but you'd think there'd be more small patch releases to decrease the eventual risk of CVEs. Either way, cool that it exists.
Because I already run everything else, including databases and web servers alongside apps in containers.
I don’t want to have to install packages on the host system or pollute it with configs in case I need to get rid of something or migrate the OS separately from the software. I don’t want a complex backup story, just a /data mount for all of my stuff. I also sure as hell don’t want to copy random configs or add other config management systems into the mix. I also don’t want to have to configure cgroups or resource limits per thing I’m running. I also want to be able to version the config and deploy it easily wherever needed, and sure as hell don’t want to set it up manually; Ansible is passable but less convenient than just a Docker Compose or Swarm stack. Generally, I keep the apps separate from the more bare host system.
Especially useful when you can easily tell what is transient data vs actual data you need to store longer term per-app, alongside custom port setup across all apps and not needing to care much about individual config formats, in addition to being able to run different versions alongside one another.
Nix or other methods would probably also work for folks, but Docker (OCI) containers just get out of my way and do the thing.
I've hosted and actively used my own email server for > 10 years and there are two things that are true at the same time:
It is absolutely possible to host, use, and achieve decent deliverability with your own server. It takes work and is a different beast than running a webserver, but that frontier is not dead (yet).
At the same time: it is an ABSOLUTELY TERRIBLE IDEA to suggest that folks operate an email server out of residential IP through your ISP. The spam prevention ecosystem is so draconian now that email traffic flowing out of address ranges belonging to residential owners is yeeted into the sun. If you've operated email infrastructure at decently large scales, you know that SPF/DKIM/DMARC are just one part of how spam is identified, and mixing in the source of email traffic into the detection heuristics is a significant part of that identification process. Achieving decent delivery can often involve "warming up" an IP over time to establish its reputation, and consumer address ranges are a hodge-podge of activity that incur very little trust about what they're doing.
I agree with some commenters that exhort the exercise of self-hosting email to prevent the venerable protocol becoming a homogeneous GMail and Outlook-only world, but there are reliable ways to do this: using a VPS, relying on a company for the sending/SMTP part, or something similar. But footguns abound, and disgorging SMTP packets from your LAN edge is one of them.
I started hosting my email at home some months ago and it works great. However, my ISP blocks some ports necessary for running a mailserver (incoming SMTP), so I have to use an SMTP relay (which is on a VPS and does port 25 to some other port that is not blocked).
Additionally, to not worry about deliverability, I let my mailserver send all outgoing mail through another service.
The additional costs for this are about 2€/month.
I use Stalwart as a mail server and it was not too hard to setup (with some caveats to get it working with my SSL certs behind a reverse proxy. But nothing a bit of LLM chatting couldn't solve).
All in all, it's not 100% self hosted, but works well.
However, I don't agree with the suggestion in the article to use a self hosted LLM. My mailserver needs a few hundred MBs of RAM at max, but with the spam filter this would increase like 10x-100x.
This is years (decades?) old but I self hosted my email until everyone suddenly stopped accepting my mail. Has this phenomenon changed? Everyone on my domain was asking me what the hell happened why is my mail not being delivered and I had to do a panicked midnight migration to Google.
Long time ago I used to run qmail for my school (about 2000 users). It was a lot of fun to do as a student sysadmin. Today, I'm tempted to build a minimal mail system for 1-10 users using agentic coding and use it for less critical use-cases like email for shopping/restaurants etc account registration. I wonder if I can get a safe and secure minimal build done completely agnatically without having to directly look at a single line of code.
If you want to do it as a learning experience, do it, but if you just want a domain with catch-all addresses, don't.
You can get a solution like SimpleLogin (don't get actual SimpleLogin, they don't do SRS) in minutes without the headache of having to configure, administer, secure and patch all that.
I also self-host, and it's not nearly as difficult as know-it-all people on the Internet make it out to be. I rolled things out from scratch using Postfix and Dovecot on Debian as I dislike bloated and opaque containers that hide important decisions from the sysadmin. The main requirements are a clean, fixed IPv4 and an aged domain.
Absolutely zero maintenance has been required since I set it up (unattended upgrades), until recently when Dovecot updated the configuration syntax. Claude ported the config script to the new syntax in about 2min.
Sorry the title should have been "You should self-host your mail server" but it seems HN removes the "You should" in the beginning of a title.
I wanted to start this discussion because I think we are prime for more self hosted mail servers in 2026 and in the post I explain how to use a locally hosted LLM to nudge the spam detector rspamd to whether or not an incoming mail is spam.
Also in times where the EU can order your mail providers to scan for unwanted content [1] (currently limited to CSAM, later probably more) it does feel better to have your data at your hand.
I started self-hosting my email server earlier this year. I use maddy[0] as my email server and route outgoing mail through MailPace[1] to avoid being memory-holed (despite having SPF and DKIM set up correctly).
My reason for self-hosting is control, not privacy: the fact that the cleartext of my outbound emails is visible in the MailPace UI is not a concern; the problem I'm solving is that email providers can delete your account.
If you are self-hosting because you care about privacy, I'm not sure why. Email requires two parties. Unless both parties are self hosting, some company has a copy of that email. Google, Microsoft, and Amazon probably see 99% of all email on the internet (ok maybe not that much but probably pretty close).
I'm not sure what privacy you gain by self hosting these days, since no one else is.
My wife and I are both in our own self-hosted server. We send sensitive emails back and forth all the time. Well, she does, not me so much. Since we're on the same server it never passes through a third party.
Plus there's people in Europe talking to each other that don't want the USA to read their emails. I mean there tons of situations wheee emails don't go through Google or Microsoft.
Email seems like an odd choice for sensitive messaging where you're in the position to manage the technology on both ends. Private XMPP or Matrix with E2EE has better privacy properties.
From this[0] report from proton mail, 74% of European email is routed through USA servers. So even if you care, the person you are sending to or receiving from probably does not. So the US companies are still seeing it.
For the use case of you and your wife, you don't really need to self host a mail server, you just need a file server, unless you're forwarding each other emails you got externally, in which case, someone probably already read it.
My overall point is that email requires at least two parties to have access to the content, oftentimes more than two, and chances are one of those parties is not privacy conscious, which breaks any privacy you think you might have.
Every single person I know who has run their own email server has, at one point or another, either outright lost mails or had important mails delayed for days.
Delivery isn't the problem, just people don't use mail as much as they used to. Most people reach for signal or whatsapp to communicate. Most mail is order confirmations. So don't really care if people can't get mail, it isn't the primary communication tool for most people like it used to me.
I'd love to self-host a mailing list, or that protonmail or fastmail offered listserv like functionality. It feels fairly intimidating to hoist my own mail server and listserv on top of that. It feels like there's too much domain-specific knowledge one needs to have to reliably debug and maintain it: DKIM, spam management, certbot, fail2ban, blah blah blah.
A lot of them will let you if you ask, for instance even ionos or ovh. Digital ocean have a blanket ban on port 25 ipv6 but I haven't seen a reason to use them for a decade now. +1 for mythic beasts
They are quite expensive for some ranges of storage which you might need for IMAP if you need a lot less than where the HDD pricing starts.
On the other hand HDD is fine for a mail server and you can get 400Gb for not much more than some email providers will charge you for three 10Gb mailboxes.
I was going to self host my email server, but somehow my email provider (Migadu) is cheaper than a VPS ($19 USD per year) and offers custom domains, catch-all, and unlimited addresses.
I disagree with the author. If you have your own domain for e-mail, then you've already dealt with all risks and vulnerabilities. Of course you have your e-mail stored locally as well by using an e-mail client, which you would anyway.
I've been self hosting since 2012 or so and it is a mixed bag. Deliverability is fine provided you're on a clean IP range, which generally only reputable hosts have.
There was a moment when my son was born and he was in NICU that my mail broke. I just went without for a while. Not ideal.
Since then I've thought: self hosting is nice but hosting cooperatively is probably the best way forward. Democratic control might beat technical control. I'll do it soon, I think: I'd be fascinated to know what people think.
I’m very interested in this approach. I’ve hosted friends’ websites for decades but I’ve been the single-point of failure, so “cooperative” is very enticing.
I’m currently working on a cooperative “lights-on” solution which might be complementary.
I've tried self-hosting my mail server, but that means all my outgoing mail will go to Spam on all providers that use reputation-based filtering. In all cases I had SPF, DKIM and DMARC working perfectly, PTR records, etc. but it just doesn't matter. Even a Fastmail domain goes right to spam on my personal account, and they are very very established. It's just not worth it.
I use a dedicated server and a vps for this, so I get around the residential IP reputation issue. The rest of the problems with deliverability are overblown. In 15 years of doing it on multiple servers, I've had one 2 month period where Gmail was spamming me and one month where Yahoo spammed me. In both cases it stopped without me changing anything, I've always suspected it's brief periods of anti-competition attempts which don't last forever
I never used residential IPs. Most ISPs don't even let you set PTR records on those. My problem was that any server at practically any provider would reuse an IP that previous customers have used to send spam in the past. For example you can't hope to send mail from a DigitalOcean IPv4 address without going to spam. Nor from Kamatera. There are probably a few more providers that are basically blackholed because they're so often used for spam. (I don't have experience with providers that don't offer IPv4.) I believe some providers even attempt to block outgoing mail.
Running your own mail server is easy for receiving mail, but it is very hard to keep your IP from getting on some random blacklist that is impossible to get off.
The problem isn’t spam, the problem is you becoming the spam.
I did test email selfhosting before and there’s a substantial amount of times my emails were never seen by the recipient, sometimes it did cost me good jobs/deals.
So now I use paid email while I control the domain and everything else, so I have the portability feature if I wanted to switch providers without any efforts, but I know now my emails will be delivered whenever I hit sent.
That being said, I self host everything else in my digital life, and I believe everyone should.
Man these days it's nearly impossible. Even my web host has trouble hosting email, even though I use it and they do a decent job. Only medium-sized specialist companies and large ones like Gmail do it well. It's just those spammers - we could have nice things like self-hosted email if everyone were nice, but we can't.
I was running Postfix+Dovecot+Seive+SpamAssassin+Fail2ban+certbot+spf+dkim+reverse-ip+<other random crap>
It worked! Receiving email was overall pretty easy. I know I also did things the "hard way" by ad-hoccing all that together, and today there are a lot more out-of-the-box solutions that do all that for you. But still. Being a full-time email administrator is a job I will never do again unless I'm getting paid for it.
You know what really sucked? Deliverability. Frequently, emails I would send would just ... vanish ... no warnings, no errors, no failures. From my end, everything was perfect. Until days later, people would follow up with me and say, "Are you going to send that email?" ...
I had a business IP (Comcast Business). The IP address was clean, not black listed anywhere, not on SORBS or other lists. Still, successfully delivering an email was like 50/50, with no way to confirm the other party actually got it.
I still self-host, but now I cheat for deliverability: route the problematic destinations (I'm looking at you, Outlook) through Amazon SES. At a few cents for five-figure numbers of emails, it's as close to free for personal/vanity email quantities as it gets to have someone whose full time job it is to make sure outgoing mail stays deliverable on your side while still keeping everything else under your control.
One thing to note is that Amazon are not very good at keeping amazonses.com up to date, so despite including it you can't set DMARC to hard-fail SPF or you will have mail bounce days.
4 different countries, different AS.
I'm always puzzled by all the issues described by others. I had about 4 issues during these 15 years, all 4 were solved by reading the bounce message and doing what was asked in the message (contacting support of the destination).
Took about 6 months initially of fiddling to get other email services to accept mail DKIM, DMARC, SPF, PTR, web form requests
For personal email, self-hosting is much more manageable. Typically GMail will send those messages to spam at first, but after a few different mailboxes have clicked “not spam” GMail learns the lesson.
If they would at least dump it in the junk mail folder, I could fix it, but no, some earlier step in the process makes it silently disappear.
For the parent post, you configure an outgoing SMTP relay
Iirc called smarthost in postfix
A user's inbound mail accumulates on a mail server. One server [protocol] handles getting the user's inbound mail to that user's mail client -- usually with protocols like POP or IMAP that let the user retrieve that accumulation.
Another server handles whatever mail the user decides to send, using SMTP. Each server is configured within the user's mail client, and that's just the normal way of doing things. It's ~always been split up like this (aside from outliers like Microsoft Exchange). :)
The user doesn't have to know anything about the existence or addition of a system like smtp2go. They just configure their client to send mail through mail.orgname.com (or whatever) like usual, and the back end handles the rest. Their pop/imap server address also stays the same.
---
Anyway, mail servers and relays. Mail servers don't talk to eachother using things like POP or IMAP. The traditional Internet way for a mail server to send mail to another is to look up the recipient domain's MX (Mail eXchanger) entry in DNS, which specifies the inbound mail server, and just send it over using SMTP.
It was thus delivered. It was all very trusting.
That trust began to break when spam became a problem that never went away. Requirements and reputation and filtering became a serious ordeal for mail servers -- both on the sending and the receiving side of things.
Services like smtp2go can handle part of the sending-side trust-wizardry in a centralized way. They do things like maintain the reputation of their IP addresses.
In using it like this, orgname's server (which might very well be under someone's desk) ceases to directly connect to each and every recipient domain's MX.
It goes through smtp2go instead: All outbound mail simply gets routed through smtp2go, as the result of a central back-end configuration thing on orgname's mail server.
In email terms this is called relaying, though smtp2go might prefer the term smarthost[1].
Meanwhile, local internal mail (from joe@orgname to jill@orgname, say) can just get delivered locally. It doesn't have to be relayed at all. This determination is made by orgname's mail server.
And, again: The user doesn't need to know or care that their mail is/isn't being relayed, and the concept of relays themselves is as old as the hills. The user can just be happy that their mail gets where it needs to go instead of being silently dumped into a ditch, and they don't need to do anything different on their end for this to happen.
[1]: https://www.smtp2go.com/blog/what-is-a-smarthost/
When sending the other side is the server, when receiving, you are the one. The protocol also has the concept of relaying, where message can go trough intermediary nodes.
So you can set one server for receiving email (yours) and another one for sending (smtpgo).
For actually reading, the server for receiving need to deliver the message (either built-in feature or through a program) to the correct mailbox. That would probably means writing it on disk somewhere. And then you need to use a mail user agent (MUA) to read that file. Protocol like imaps and pop3 are for transfering your inbox to another computer, not for receiving or delivering email.
So frustrating because they have no legal obligation to accept our emails but our product relies on them being delivered.
I gave up and moved everyone over to SES instead.
Not sure if that's still the case
And on the deliverability side, using SES for sending avoids this entirely. Yes, ok, not fully self-hosted I suppose, but it's close enough (and for most people, the bill will be pennies).
But I encourage everyone who likes tech and freedom to host their own email. So many reasons.
Some are pragmatic, for example that way you won't ever get locked out suddenly of your entire digital existence when google/microsoft decide to lock you out for no reason and you will never reach support capable of helping.
Some are more about taking a stand for freedom, but that's also worthwhile. The internet was not meant to be owned by just a few behemots who get to control all content. The internet is about distributed peer to peer protocols. Nothing embodies that better than everyone running their own mail server, if you can.
As many say below, if you're worried about the deliverability you can still run your own email server and have nearly all the benefits even if you use a third party relay for delivery.
That said I also deliver from my email server and it is totally fine, the fears are overhyped. Delivery to microsoft is the worst, but even that one just takes filling a form on occasions (been over a year since had to do it last time).
1. IP reputation is a big deal, its not just about not being on some blocklist, call it a cartel at this point, its about being on the allow list for other mail providers
2. Keeping it reputable is a continuous effort
Never had any issues since then, though I did have to adjust to new standards such as DKIM, DMARC, SPF etc. over the years.
No deliverability problems. The issues with self-hosting email are drastically overblown.
- Outlook.com consumer mail addresses
you can still get >99% delivery rate if you have spf, dkim and all the new cool stuff.
So no, please DO NOT recommend against doing it because ONLY if mail stays a decentralized service providers will stay forced to not blacklist everything but other large providers.
You don’t build your own fridge. If it’s important and not your strong suit, pay someone to do it for you.
In my professional life I managed email infrastructures since 20 years ago. It only got harder.
If you achieve 100% delivery rate you will surely share the results, right? No? Oh i guess all those services simply tell you they make it easier for you while not actually achieving that - but why check?
AFAIK, that case in 2019 was the only time an e-mail went missing.
Yea we do all the best practices but still no one can guarantee 100% deliveries. Just not possible for e-mail.
Yes we can have 100% over a year but after that it still is a lottery, can’t say anything about future not having suddenly 40% not delivered
Just too critical of a component in most people's lives to accept any level of unknowns in.
That's cheaper than I can rent any mail-capable VPS for, and it's cheaper than the electricity I'd pay (80W @ $0.15/kWh = $316 over 3 years) to self-host.
And that doesn't include my personal-time hourly cost.
The last small-corpo email server I ran myself was a Pentium 4 box that worked for eons. It did all of the things (the spam filtering, the virus scanning, the tossing, the software RAID storage, the open internet-facing ports including the webmail) for all of the people.
But it turned out that even with dozens of users, it hardly ever saw any load. Email was a complete snoozefest for it.
I'm quite confident that an N100 box would run circles around that P4 machine using any metric, and use an average of less than 10 Watts if all it needs to do is serve mail at home.
- you get the vanity email address
- you can switch email providers (including self-hosting later on)
- you can have ~unlimited aliases (depends on the provider)
Most of the setup consists of steps you will have to take anyway when self-hosting (getting a domain, changing DNS records), except for a major amount of headaches that will be taken care of for you.
my backend is still dovecot+postfix, still works beautifully. I am able to run rspamd+dovecot proxy on a small vps and the storage is handled by a backend office server with dovecot. If VPS has an issue can spinup another easily/anywhere and backend is also virtualized (libvirt) so easily restored (with multiple backups in multiple places)
biggest thing to worry about with deliverability is ensuring your SPF and DKIM (opendkim) are correct, which is not too difficult and rspamd is able to handle the dkim signing/verification which is nice
"spam is solved" looks a lot different at each of those
I've been doing it since late 90s for several domains, servers run in DCs.
Deliverablity wasn't a problem once I set everything well (and I forwarded most, including received phishing/spam, to my big provider account), but constant fight with incoming spam and effort to keep the servers safe, secure, updated, monitored and finally paid for, weren't really worth it.
For unlimited aliases I bought the service that lets me use my domains, for smtp for servers I was using sendgrid and ses anyway.
The effort is not worth that, especially not with the powerful LLMs looking for vulnerabilities.
I can spend the time I was sinking into keeping it afloat on something more creative.
I have decided that if my VPS provider shuts down, I can just send my outgoing mail through a cloud provider's SMTP gateway. My volume is low enough that it will be free or cost a few cents a month.
Deliverability is not a problem for me, but incoming spam does not have a great solution. Even with rspamd, a lot of crap gets through if you start spamming your email address everywhere. This is why I use a lot of throwaway and company-specific email address.
If you only have one email address, yeah Fastmail or whatever is cheap. But as soon as you want multiple users (family) and throwaway email addresses, it gets expensive in a hurry. But those are free if you self-host.
I would never run my own mail server today. Deliverability is a nightmare, despite what this article says. Gmail/Hotmail (and all the domains they host for people, which is quite a lot) will pretty much block or silently drop any email that isn't from a large, known provider who has actually talked directly to them.
If you don't have time to be a full-time mail deliverability engineer/product manager, just pay someone to do it for you.
It definitely requires some effort but once you've got it up and running it's pretty hands off. The only issues I've ever had are expiring certs but I've fixed that by configuring auto-renewals and it's all good now.
Ensuring your source IP isn't blacklisted is probably the single most important factor. I had to request a new IP from Linode where my server runs as the one it was originally assigned had a bad reputation.
Other than every smtp relay hop and any network tap along the way that could keep a copy. Hope you're encrypting and not worried about the envelope. Email is fundamentally not private. Self-hosting doesn't help all that much (though it may keep it out of certain companies' hands, aside from the emails copied to or sent from that provider)
I use dyndns to handle IP changes (incredibly rare with Frontier FIOS, actually). I use mailhop.org to handle secondary MX records in case my machine is down (as well as mail filtering) Everything else is postfix, spamassassin, dovecot imap
It's not a trivial system, and it took a while to get everything working how I wanted. It's a terrific learning opportunity, but it's by no means simple to mentally model the process of all that happens inside.
I also run mail servers for others, mostly non-profit adjacent groups who don’t have the capital to be extorted by cloud service providers.
Sure, there are some things to learn, but like anything – if you do it properly, it’s not hard and can work properly. Never had any deliverability issues over that time (yes, even to the big providers). I also almost never touch the boxes (I do about one architectural overhaul a decade and am working on the next right now).
If you’re willing to invest the time and resources to do it properly, I agree, it works fine.
So I'm doing it now but I'm ready to switch back to one of my Colo servers at any time and I won't be surprised if I have to at some point.
> but if your home internet checks these boxes, you can 100% host your own mailserver at home:
Because above is only needed if you want to communicate with people using Gmail, Yahoo, Outlook, Fastmail, Proton etc (The monopoly).For normal folks, they are better off using an alternate less privileged email service like email.riamu.io.
I am running Docker Mailserver because it's one of the very few options that were actually easy to administer: https://docker-mailserver.github.io/docker-mailserver/latest...
But the last release was like a year ago: https://github.com/docker-mailserver/docker-mailserver/relea... and same with the container that was published: https://hub.docker.com/r/mailserver/docker-mailserver/tags
I guess there is the edge version and more recent commits, and overall it should be stable, but you'd think there'd be more small patch releases to decrease the eventual risk of CVEs. Either way, cool that it exists.
I don’t want to have to install packages on the host system or pollute it with configs in case I need to get rid of something or migrate the OS separately from the software. I don’t want a complex backup story, just a /data mount for all of my stuff. I also sure as hell don’t want to copy random configs or add other config management systems into the mix. I also don’t want to have to configure cgroups or resource limits per thing I’m running. I also want to be able to version the config and deploy it easily wherever needed, and sure as hell don’t want to set it up manually; Ansible is passable but less convenient than just a Docker Compose or Swarm stack. Generally, I keep the apps separate from the more bare host system.
Especially useful when you can easily tell what is transient data vs actual data you need to store longer term per-app, alongside custom port setup across all apps and not needing to care much about individual config formats, in addition to being able to run different versions alongside one another.
Nix or other methods would probably also work for folks, but Docker (OCI) containers just get out of my way and do the thing.
It is absolutely possible to host, use, and achieve decent deliverability with your own server. It takes work and is a different beast than running a webserver, but that frontier is not dead (yet).
At the same time: it is an ABSOLUTELY TERRIBLE IDEA to suggest that folks operate an email server out of residential IP through your ISP. The spam prevention ecosystem is so draconian now that email traffic flowing out of address ranges belonging to residential owners is yeeted into the sun. If you've operated email infrastructure at decently large scales, you know that SPF/DKIM/DMARC are just one part of how spam is identified, and mixing in the source of email traffic into the detection heuristics is a significant part of that identification process. Achieving decent delivery can often involve "warming up" an IP over time to establish its reputation, and consumer address ranges are a hodge-podge of activity that incur very little trust about what they're doing.
I agree with some commenters that exhort the exercise of self-hosting email to prevent the venerable protocol becoming a homogeneous GMail and Outlook-only world, but there are reliable ways to do this: using a VPS, relying on a company for the sending/SMTP part, or something similar. But footguns abound, and disgorging SMTP packets from your LAN edge is one of them.
I use Stalwart as a mail server and it was not too hard to setup (with some caveats to get it working with my SSL certs behind a reverse proxy. But nothing a bit of LLM chatting couldn't solve). All in all, it's not 100% self hosted, but works well.
However, I don't agree with the suggestion in the article to use a self hosted LLM. My mailserver needs a few hundred MBs of RAM at max, but with the spam filter this would increase like 10x-100x.
You can get a solution like SimpleLogin (don't get actual SimpleLogin, they don't do SRS) in minutes without the headache of having to configure, administer, secure and patch all that.
Also check out https://jmap.io - great stuff coming to the world of open source e-mail!
Another good guide that uses Debian and its standard packages:
* https://workaround.org/ispmail-trixie
(Updated with every release, and upgrade/migration instructions.)
https://www.iredmail.org
https://mailinabox.email/
I'd recommend mailcow for regular usage, or mailinabox if you're low on RAM or configuring email for server (not for people).
Absolutely zero maintenance has been required since I set it up (unattended upgrades), until recently when Dovecot updated the configuration syntax. Claude ported the config script to the new syntax in about 2min.
I wanted to start this discussion because I think we are prime for more self hosted mail servers in 2026 and in the post I explain how to use a locally hosted LLM to nudge the spam detector rspamd to whether or not an incoming mail is spam.
Also in times where the EU can order your mail providers to scan for unwanted content [1] (currently limited to CSAM, later probably more) it does feel better to have your data at your hand.
[1] https://en.philenews.com/international/privacy-to-end-in-the...
SMTP relays are cheap--worth a few pennies a month to not deal with IP rep.
My reason for self-hosting is control, not privacy: the fact that the cleartext of my outbound emails is visible in the MailPace UI is not a concern; the problem I'm solving is that email providers can delete your account.
[0] https://maddy.email/
[1] https://mailpace.com/
I'm not sure what privacy you gain by self hosting these days, since no one else is.
Plus there's people in Europe talking to each other that don't want the USA to read their emails. I mean there tons of situations wheee emails don't go through Google or Microsoft.
For the use case of you and your wife, you don't really need to self host a mail server, you just need a file server, unless you're forwarding each other emails you got externally, in which case, someone probably already read it.
My overall point is that email requires at least two parties to have access to the content, oftentimes more than two, and chances are one of those parties is not privacy conscious, which breaks any privacy you think you might have.
[0] https://proton.me/business/europe-tech-watch
So if they self-hosted more they would t go through the USA.
And I bet now that 75% is decreasing rapidly.
But really email is not secure. It should be encrypted on the wire server to server but that's not guaranteed.
So just try hosting it yourself. It's not a big deal.
It's not worth it.
Delivery isn't the problem, just people don't use mail as much as they used to. Most people reach for signal or whatsapp to communicate. Most mail is order confirmations. So don't really care if people can't get mail, it isn't the primary communication tool for most people like it used to me.
On the other hand HDD is fine for a mail server and you can get 400Gb for not much more than some email providers will charge you for three 10Gb mailboxes.
it's still doable and you get the best feeling there is: Living in the internet.
Can recommend 100%.
https://en.wikipedia.org/wiki/Hillary_Clinton_email_controve...
There was a moment when my son was born and he was in NICU that my mail broke. I just went without for a while. Not ideal.
Since then I've thought: self hosting is nice but hosting cooperatively is probably the best way forward. Democratic control might beat technical control. I'll do it soon, I think: I'd be fascinated to know what people think.
I’m currently working on a cooperative “lights-on” solution which might be complementary.
I pay for a perceptual license of Zimbra.
I did test email selfhosting before and there’s a substantial amount of times my emails were never seen by the recipient, sometimes it did cost me good jobs/deals.
So now I use paid email while I control the domain and everything else, so I have the portability feature if I wanted to switch providers without any efforts, but I know now my emails will be delivered whenever I hit sent.
That being said, I self host everything else in my digital life, and I believe everyone should.
Given your advice on mailservers in a public thread would you also care to share your real world practical experience with selfhosting email?