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?
As someone who tried to self-host it like a month ago (and seemingly still hasn’t got it fully working), I’ll just write out the overview of what I’ve done and let you (and others) comment on how correct and feasible it is.
Since my ISP doesn’t allow me to get a static IP address, I rented a VPS connection and made a wireguard tunnel from the VPS to my computer. This tunnel forwards traffic at all the necessary ports between the two machines. I really wasn’t familiar with all the necessary components for an entire mail server, so I chose mailcow since it packages everything into one single software (well, more like a bunch of docker containers). Another reason I went with mailcow was that I could easily find a github tutorial for how to set up mailcow with wireguard tunneling (it’s a bit outdated IMO, but the changes are minor). Mailcow also gives a nice portal interface listing out all the DNS entries you need to put in place to get it working perfectly.
In the end, I still see a few incoming emails getting dropped and reception time being an hour or so, and I’m not sure if it’s a problem with my tunnel or DNS or something else. But overall, I’d say it was much easier than setting up all the individual services myself.