I have self hosted side 2001, mostly opensuse, with postfix, but the IMAP etc has changed over the years, now using dovecot. Yes its a pain, yes it takes effort, but just like some people spend there spare time painting, I run my own email server.
postfix, dovecot, rspamd on debian stable, with lots of custom configuration. The main problem is not really the server side or getting it set up right, if you know what you're doing, but outbound delivery if you're sending SMTP traffic from any kind of bulk hosting/VPS/VM/colo provider. No matter how impeccable your spf, dkim, dmarc is.
I run the same, except on FreeBSD. I have my own ASN and an IPv4 /24 block with a good reputation dating back the 90's. Basically, it looks like a corporate network, not some random VPS, even though it's run out of a basement colo in the middle of suburbia.
There's huge ranges of possible answers depending on the age of objects, which registry it is through, if they have signed paperwork for ARIN, etc. etc.
One interesting option for obtaining IPv4 space maybe registering through the Amateur Radio Digital Networking (AMPRNet). Not sure the requirements any longer for that. Otherwise, as well known, IPv4 blocks have all been handed out, so obtaining any now-a-days usually would be purchase through an IPbroker such as https://auctions.ipv4.global/ . This wasn't the case in the past. The OP probably has a legacy IP block holding from the early days.
Then you'd need to find an ISP that would allow you to talk BGP over a residential link, which is going to be very slim pickings, but some exist out there. I used to allow it, but that ISP is no more.
Yes, I have a legacy /24 block that costs nothing. I also have an ASN and v6 block through a RIPE LIR, which is about 100 euros yearly. I also have 2 VPSes handling BGP and tunneling traffic back to me over Wireguard. There are many BGP-friendly VPS providers. This avoids the need to peer directly with a residential ISP.
Spf, DMARC, DKIM all in place and my wife still has her own-domain outbound mail blocked by a government org who use some shitty spam protection that ignores all of that, blocks our email provider and doesn't even allow her to reply to emails they sent her.
I'm also considering self-hosting email, but pretty much everything I've read suggests that keeping your emails out of spam folders is a huge pain. Still exploring different options.
Linode and hand the keys to Claude. It sets up dkim, dmarc, spf etc and will guide you through processing dmarc reports. Interestingly it's better than the previous (hand tuned over 15 years) setup in that even hotmail manages to receive email now.
However, my server went down many, many times for hours without me noticing, sometimes for days.
Despite today's outage, it's still more than worth having a third-party company like Google or Microsoft handle your email. At least they have monitoring 24/7 and people on call to fix issues when things stop working.
Mail-in-a-box (https://mailinabox.email) on Ubuntu Server which installs Postfix, Dovecot, nsd, NextCloud, RoundCube, nginx, spam assasin, postgrey ... and a good admin panel.
Mine runs on an Intel NUC at home, with the a sensible ISP who naturally can provide a fixed IP address (everything open), IPv6, and clean address.
Been very happy with it, both the software, and the independence :) A little IT and network knowledge is useful if you're doing more than the standard (VPS) install, but that's to be expected.
Many good answers. But I was wondering how you guys appeal to the Big Two (Google and Microsoft) if you end up in either their publicly known or secret spam lists? Especially the latter seems to be a problem despite having set up spf, dkim, dmarc correctly.
Sign up for Google Postmaster Tools, for which there is no charge, and enroll your mail server. Set up feedback loops with google so that they can send you information about deliveries. Postmaster tools will show you all of your domains and IPs that you add and tell you what their reputation are with google. If you want to hit the inbox with the major mailbox providers, use the tools they provide for people that send large amounts of email to them. They work just as well for a self-hosted email server on a VPS as they do for the big senders.
My advice after doing it for 13+ years is - don't do it.
Finding a hosting provider that gives you a clean class C to run out of is almost impossible. Every VPS has tenants who spam, and every provider will be flagged in one way or another. You will spend a bunch of time trying to white-list/make your mail server behave to ensure delivery to the google/microsoft mail servers, and some systems will just ban your email anyways.
It got to the point where I would send an email to someone, and then follow up with a phone call because I was not confident mail would be delivered as expected.
I found a hosting provider dedicated to e-mail (Migadu actually), and switched everything over to that and haven't realistically had to worry about maintaining a mail server since
I have been hosting my mail server for more than 20 years.
Fedora + sendmail + dovecot.
I had the biggest problems with Microsoft servers. They blocked my (not spam) e-mails repeateadly and I gave up writing to support. :(
But, I intend to keep doing it. I think is worth it.
I've been self hosting for years, but gave up outbound delivery a long time ago. I use my (very tech savvy) ISP for that who is still willing to relay (authenticated) for my domain that has nothing to do with them.
Inbound self hosting still has its advantages. I control filtering, storage and backups, and data sovereignty is mine. Spam is always a pain, but blocking spammy providers entirely keeps spam volumes low (maybe 1-5 a day that aren't rejected at SMTP time) and I don't seem to miss anything important, not even one-off transactional emails with random businesses.
so, all my life i used 3rd parties. last year i had to self host because at every provider was flagged as spam. i even paid Google workspace, and gmail flagged most as spam!
self hosting was a breeze. one day to setup exim, nginx+letsencrypt to rotate certs, dmarc and sfp and everything passing with flying colors.
only nightmare is having it open to the outside, but wireguard solves that.
and i get less spam marks everywhere. it's a finally the time to self host email!
I am not sure if reliable and hetzner can be combined in a single sentence or a paragraph. Or an article, to that matter.
Self hosting for 25+ years, hundreds of domains. Postfix, dovecot, spam-assassin, OpenDKIM. Everything works, last 20 years with little to no maintenance. The biggest hurdle is fraud-like "antispam" companies ProofPoint and alike.
Tech stack doesn't matter at all - what matters is your knowledge to set it up. You can get exactly same results with MS Exchange or exim.
This brings to an important topic - if you don't know how to set it up properly - don't do it. Proper mail delivery (if we speak volumes in 8+ numbers daily) is not a "do this 5 min set up and forget" by some ai slop writer, but something requiring tuneup from someone who has experience on how real world mail works. Arguably it is exactly why 99% people who try to selfhost email fail.
been self hosting for so long, started with sendmail running on solaris, but now docker mailserver.
Due to a forced IP change by ISP I recently changed to having outgoing mail sent by AWS SES, using it to do the DKIM signing, so my mailserver postfix uses it as the sender, but the receiving happens on my stuff.
I think its a nice balance between self hosting and managing deliverability, but agree it doesn't count as 100% self hosted.
It runs on a hp cube server in my house, backed up frequently with restic.
Been self hosting email, from home, for 2 decades now. A good ISP is required. Can recommend freedom.nl in The Netherlands. You will also need a DNS provider that supports TLSA records. Occasionally the mail server gets blocked, mostly by Microsoft. Had no issues in the last year.
A month ago I upgraded to Ubuntu 26.04. Usually these upgrades go smooth, but not this time. The upgrade broke my Postfix/Dovecot/Amvisd/Spamassassin/Clamav stack. Over time the stack became too complex, and I could not figure it out anymore. Instead I did a crash migration to Stalwart. Stalwart is challenging to setup when it does not control the full http stack, but for sure it was easier than fixing Dovecot.
32 comments
[ 2.5 ms ] story [ 31.4 ms ] threadIf you need to start from scratch, looking to sign an RSP and are in North America, you'd possibly get your ASN through ARIN, and their fee schedule is at https://www.arin.net/resources/fees/fee_schedule/#end-users
One interesting option for obtaining IPv4 space maybe registering through the Amateur Radio Digital Networking (AMPRNet). Not sure the requirements any longer for that. Otherwise, as well known, IPv4 blocks have all been handed out, so obtaining any now-a-days usually would be purchase through an IPbroker such as https://auctions.ipv4.global/ . This wasn't the case in the past. The OP probably has a legacy IP block holding from the early days.
Then you'd need to find an ISP that would allow you to talk BGP over a residential link, which is going to be very slim pickings, but some exist out there. I used to allow it, but that ISP is no more.
Works like a charm!
[0]: https://gitlab.com/simple-nixos-mailserver/nixos-mailserver
I'm also considering self-hosting email, but pretty much everything I've read suggests that keeping your emails out of spam folders is a huge pain. Still exploring different options.
However, my server went down many, many times for hours without me noticing, sometimes for days.
Despite today's outage, it's still more than worth having a third-party company like Google or Microsoft handle your email. At least they have monitoring 24/7 and people on call to fix issues when things stop working.
Mine runs on an Intel NUC at home, with the a sensible ISP who naturally can provide a fixed IP address (everything open), IPv6, and clean address.
Been very happy with it, both the software, and the independence :) A little IT and network knowledge is useful if you're doing more than the standard (VPS) install, but that's to be expected.
Some emails end up in spam some don't, quite frankly I just need it for system alerts for my self hosted services
Finding a hosting provider that gives you a clean class C to run out of is almost impossible. Every VPS has tenants who spam, and every provider will be flagged in one way or another. You will spend a bunch of time trying to white-list/make your mail server behave to ensure delivery to the google/microsoft mail servers, and some systems will just ban your email anyways.
It got to the point where I would send an email to someone, and then follow up with a phone call because I was not confident mail would be delivered as expected.
I found a hosting provider dedicated to e-mail (Migadu actually), and switched everything over to that and haven't realistically had to worry about maintaining a mail server since
I have been hosting my mail server for more than 20 years. Fedora + sendmail + dovecot. I had the biggest problems with Microsoft servers. They blocked my (not spam) e-mails repeateadly and I gave up writing to support. :( But, I intend to keep doing it. I think is worth it.
Inbound self hosting still has its advantages. I control filtering, storage and backups, and data sovereignty is mine. Spam is always a pain, but blocking spammy providers entirely keeps spam volumes low (maybe 1-5 a day that aren't rejected at SMTP time) and I don't seem to miss anything important, not even one-off transactional emails with random businesses.
self hosting was a breeze. one day to setup exim, nginx+letsencrypt to rotate certs, dmarc and sfp and everything passing with flying colors.
only nightmare is having it open to the outside, but wireguard solves that.
and i get less spam marks everywhere. it's a finally the time to self host email!
Self hosting for 25+ years, hundreds of domains. Postfix, dovecot, spam-assassin, OpenDKIM. Everything works, last 20 years with little to no maintenance. The biggest hurdle is fraud-like "antispam" companies ProofPoint and alike.
Tech stack doesn't matter at all - what matters is your knowledge to set it up. You can get exactly same results with MS Exchange or exim.
This brings to an important topic - if you don't know how to set it up properly - don't do it. Proper mail delivery (if we speak volumes in 8+ numbers daily) is not a "do this 5 min set up and forget" by some ai slop writer, but something requiring tuneup from someone who has experience on how real world mail works. Arguably it is exactly why 99% people who try to selfhost email fail.
But if half the world is using Outlook.com for their email you still can't reach anyone if Azure goes down.
Due to a forced IP change by ISP I recently changed to having outgoing mail sent by AWS SES, using it to do the DKIM signing, so my mailserver postfix uses it as the sender, but the receiving happens on my stuff.
I think its a nice balance between self hosting and managing deliverability, but agree it doesn't count as 100% self hosted.
It runs on a hp cube server in my house, backed up frequently with restic.
https://docker-mailserver.github.io/docker-mailserver/latest...
A month ago I upgraded to Ubuntu 26.04. Usually these upgrades go smooth, but not this time. The upgrade broke my Postfix/Dovecot/Amvisd/Spamassassin/Clamav stack. Over time the stack became too complex, and I could not figure it out anymore. Instead I did a crash migration to Stalwart. Stalwart is challenging to setup when it does not control the full http stack, but for sure it was easier than fixing Dovecot.