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.
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.
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.
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.
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.
> 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 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
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.
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.
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.
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.
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
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 many 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.
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.
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 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.
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.
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.
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.
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.
I beg to differ on:
> 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 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
It’s not hard to receive or filter mail - knowing that somebody will receive your email after you send it is another thing entirely.
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.
out of curiosity, are you talking about personal, small business, or corporate?
"spam is solved" looks a lot different at each of those
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.
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.
Michael W Lucas has a book[0] on the subject too: https://mwl.io/static/books/run-your-own-mail-server.html
I self-host with telekom business, 2 fixed ip lines fiber and vdsl at home everything from auth ns to mail and web. Its around 85€ for me.
it's still doable and you get the best feeling there is: Living in the internet.
Can recommend 100%.
Blast from the past:
https://en.wikipedia.org/wiki/Hillary_Clinton_email_controve...
> But there are other solutions out there like: Stalwart; Mailcow ;Or if you're a purist you can set up your whole server yourself
Another good guide that uses Debian and its standard packages:
* https://workaround.org/ispmail-trixie
(Updated with every release, and upgrade/migration instructions.)
Some out of the box solutions.
https://www.iredmail.org
https://mailinabox.email/
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.
[1] https://en.philenews.com/international/privacy-to-end-in-the...
What hosting / VPS companies do you recommend? Finding one which allows you to run a mail server is some work.
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
Mythic beasts. Their IP ranges are pretty clean and well managed. My deliverability has been fine there for years.
Waiting for a submission of "You should run your own NNTP server" (lots of 'nostalgia' for web forums to come back, so why not this too?).
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.
Counterpoint: No.
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 many 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.
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.
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.
Good luck having your emails hitting any inbox instead of ending up in spam.
Ending up in spam is not that bad, compared to emails simply dropped silently, without either party having any idea.
Thanks. 15 years of good luck so far