I tried maybe 15 years ago and it went about as well as you’d expect for back then. But I’m starting to get the itch again.
Have any of you tried relatively recently? How impossible is it to get reliable deliverability to gmail and whatnot these days?
There are a few complete mail servers out there now that simplify everything into one package.
docker-mailserver is a great choice in my opinion.
I’ve been self hosting email successfully for 20 years. My goto article for this question:
https://poolp.org/posts/2019-08-30/you-should-not-run-your-mail-server-because-mail-is-hard/
TLDR;
- Mail is not hard: people keep repeating that because they read it, not because they tried it
- Big Mailer Corps are quite happy with that myth, it keeps their userbase growing
- Big Mailer Corps control a large percentage of the e-mail address space which is good for none of us
- It’s ok that people have their e-mails hosted at Big Mailer Corps as long as there’s enough people outside too
OK SPAM is not the issue but my mails will not reach my users at Big Mailer Corps
The article’s answer to this one is handwavey “there are rules that spammers can’t meet, but you can do it just fine”. This is not the whole story by far. This is a more comprehensive overview of why it doesn’t work:
On a dynamic IP connection, you can very easily have had the address flagged already. If the one you have now isn’t flagged, the one you get later might be. Debugging intermittent problems is not fun.
They also like it when your domain has shown good behavior already. I can do that because my domain has existed for over 20 years and I’ve hosted email on it in one form or another for that whole time. A person starting out on their own is not going to be able to do that.
This doesn’t necessarily mean that the big providers are the only option. There are smaller providers, like Fastmail.
Lastly, any server config where they claim it’s easy because “the configuration reads almost as plain english” is a big red flag for me. Plain language config or programming does not work as well as anyone thinks.
Never read this article before, thanks for sharing!
Selfhost several domains for over 25 years, from home, on a dynamic IP (though it hasn’t changed in a long time) and no PTR records, and I have literally had zero problems with blacklisting or dropped connections. I must live a charmed life, or have set up my DKIM/SPF/dmarc records correctly.
Currently using mailcow-dockerized and it’s lovely.
mailcow-dockerized is great, really makes email setup so much easier.
Do you ever send mails to Gmail and Office365? Do you get through the spam filter without PTR record?
Do you ever send mails to Gmail and Office365
All the time, never had an issue. I get dmarc reports constantly since I set my dmarc to notify, not just failed, but I’ve never seen PTR checked on Microsoft or google. It passes SPF and DKIM (presumably spam but you don’t get a report for that) and they let it through. I used to think it was because I’ve had most of my domains for a long time, but the couple times I’ve brought a new domain online, they seem to be fine with them.
Now they might be passed because my old domains have never had an issue and they get associated because they come from the same IP?
My ISP would let me set a PTR if I wanted but I haven’t bothered because it doesn’t seem to be an issue.
Yes! I started like a year ago and am very happy. I strongly recommend mox. It’s lightweight and the configuration makes it very clear how to set it up properly. I had some weird issue with sending mail to Apple accounts but (believe it or not) I reached out to Apple and they seemed to fix it.
I’m not an apple hater, but that’s kinda insane considering how hostile they are towards developers.
If I had to make one suggestion, I would use a trusted third party to relay outbound e-mail such as AWS SES, mxroute, sendgrid, mailgun, etc. When I was looking for a job a few years ago, I found many potential employers’ systems would flag my e-mails as junk or simply delete them, and I had to revert to gmail. My second suggestion is to properly set up TLS/SSL for security, and SPF, DKIM, and DMARC for maximum deliverability. I’m currently using a deprecated application, but I’ve been testing mailcow which seems alright.
Beware that Mailgun doesn’t differentiate between transactional and marketing emails, this could hurt your deliverability.
Used mailcow for years but recently switched to stalwart just for cutting edge features like jmap.
Been self hosting email for a good while now and it’s been largely painless. My emails are not getting marked spam either. Although my only outgoing mails are to FOSS mailing lists and occasionally to individuals, not for anything business related.
I would say that if self hosting email sounds like something you’d be interested in, then it probably is worthwhile for you. I like being able to configure my mail server exactly the way I want it, and I have some server side scripts I wrote for server side mail processing, which is useful as I have several different mail clients so it makes sense to do processing on the server rather than trying to configure it on my many clients. It definitely falls into the “poweruser” category of activities but I’ve had fun and I enjoy my digital sovereignty.
I have self hosted my email since 2006. I gave up on self hosting outgoing mail in 2021, but I still keep the server up for incoming mail, and still set up throwaway accounts on there.
The hard part of hosting email is getting Google and Microsoft to accept outgoing mail. Tons of businesses that do not have visibly outlook .com or gmail .com addresses are still hosted by those servers.
I had SPF, DKIM, and a static datacenter IP address with no reputation problems. I still couldn’t get through to Microsoft, not even in people’s junk mail directory, until they manually whitelisted my address. Microsoft didn’t allow them to whitelist a whole domain. Google was a little easier, but they added new demands monthly.
In 2025, I can’t get reliable delivery to gmail .com addresses even sending from a hotmail .com address in the outlook .com web interface.
I have been self-hosting my mail server for the past 5 or 6 years with success. Recently my ISP decided to close port 25 so I have to use a third party to deliver my outgoing mail.
The fact that ISPs can do this should be a fkn outrage. But this is so far removed from what people care about. And so net neutrality gets eroded.
I don’t think they want to bother with the administration, they were forced to to stop anyone from spamming from random SMTP servers.
Because of dmarc and DKIM, we don’t really need this anymore, but there were good reasons for it.
I know some ISPs can enable it if you call them and ask them
I have not done so in the traditional sense in quite some years. My experience was that it was an increasing headache due to crashing into a wide variety of anti-spam efforts. Get email past one and crash into another.
Depending upon your use case – using the “forward to a smarthost” feature in some mail server packages to forward to a mailserver run by a SMTP service provider with whom you have an account might work for you. Then it still looks to local software like you have a local mailserver.
If I were going to do a conventional, no-smarthost mailserver today, I think that I would probably start out by setting up a bunch of spam-filtering stuff — SpamAssassin, I dunno what-all gets used these days on a “regular” account — and then emailing stuff from my server and seeing what throws up red flags. That’d let me actually see the scoring and stuff that’s killing email. Once I had it as clean as I could get it, I’d get a variety of people I know on different mail servers and ask them to respond back to a test email, and see what made it out.
I tried the all-in-one server Mox two years ago and it just worked. In fact, I’m still productively using it to this day.
The spam filter could be a little better, but it does a good enough job IMO.
I tried, but my IMAP server recently stopped working. It also got flagged as spam by literally everyone I sent an email to.
deleted by creator
Yes I do host my email myself since tens of years.
No I do not self-host it at home
See here https://wiki.gardiol.org/doku.php?id=email%3Astart (disclaimer: my wiki)
Good read. Now I want to do it too.
I’ll add your blog to my small search engine I you don’t mind (kukei.eu)
Also, you don’t need that cookie prompt. If you only use technical cookies and no tracking, no consent needed.
Please add, i don’t mind.
I know I don’t need the prompt, i just never remembered to disable it…
I recently set up the whole stack (Postfix, Dovecot, OpenDKIM) on a VPS. I wanted to do it from home, but my ISP won’t provide a static IP or open ports 25/465/587 for consumer customers, no exceptions.
It took me about two days to get everything working, but most of that was because I went in with very little knowledge of how email even actually works. If you’re looking for a learning experience, I’d say go for it. If you just want a working email setup quickly, I wouldn’t recommend it.
I haven’t noticed any deliverability issues so far. Just make sure you have SPF, DKIM, DMARC, and PTR records all set correctly from the start.
Which VPS provider are you using? Many of them end up blacklisted for mail delivery due to spammers using them.