It’s already been a while, but I once (successfully) ran my own mail server for some time. I did this using the open source Mailcow project, which does all the configuration work for you and wraps everything nicely in Docker containers. There are also a few posts about it here on the blog.
Recently, there has been a lot of talk in my blog bubble about email self-hosting again (here is one example, here is a second one). I myself switched to a self-hosted mail server over a year ago, only to switch back to a hosted version a few months later.
Self-hosting my blog and the related services not only gives me the independence from third-party-services, it also gives me the option to customize things to my liking. In my opinion, this is even more important.
Containers are wonderful and Docker is a really awesome and lifesaving technology, even if you don’t host sites and services with millions of users that need to auto-scale etc. Docker can already simplify a simple hosting setup just with a couple of small webpages and a Git server.