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.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
No low-effort posts. This is subjective and will largely be determined by the community member reports.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
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 would recommend something like stalwart, which is just a single binary and works. Gives you a web interface and a zonefile you can just copy paste into your DNS including all correct DMARC DKIM SPF and autodiscovery records.
Setting postfix, dovecot etc. up from scratch can be a bit time consuming and annoying.
Deliverability depends on where it is hosted, many VPC providers IP space is completely blocked in spam filters.
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;
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.
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.
I have been using my own email for many years (to this day). Everything is working great. The main thing is to have a static IP and be able to specify your domain in the PTR record of the ip address.
In general, you will need: postfix (https://wiki.archlinux.org/title/Postfix) OpenDMARC (https://wiki.archlinux.org/title/OpenDMARC) OpenDKIM (https://wiki.archlinux.org/title/OpenDKIM) Dovecot (https://wiki.archlinux.org/title/Dovecot) Some interface to choose from (soGO, roundcube) Maybe graylists, ClamAV, SpamAssassin, or something else to protect your mailbox from spam and viruses. And if you want filtering functionality, then you also need Sieve.
Where are you hosting your mail?
On my home server. My ISP gives me a static address and makes PTR records for only about $1.5 per month.
How do connect to your mail’s server outside your home network?
Sorry for all the questions, I’m trying to get my DNS working with a vpn and it’s been difficult.
If you want to be able to accept mail, you’ll need to directly expose your mail server on your public IP (router configuration required). You’ll also need to allow your server to egress your WAN as well. That being said - if you really want tighten your security, and don’t care about missing some emails, you could limit your server to seeing only those servers you know you’ll be communicating with, such as work, bank, or GMail servers only.
You can make it so that retrieving your email with your client of choice requires a VPN connection to your home network also.