UPDATE Apr, 17 2018: Update imapsync to run as standalone docker container to make deployment easier.
In this article I will show you how to set up a fully-featured mail server including webmail as a Docker container. This article is part of the byeCloud series in which I try to replace iCloud with self-hosted services.
Let’s be honest: Setting up a mailserver really is a pain in the ass. Always. There are so many components involved, on a pretty standard setup starting from Dovecot and Postfix to Amavis, OpenDKIM, ClamAV, postgrey and much more. Getting all those components working together and, even more important, create a secure configuration for a mailserver is a work that often takes days to weeks until you have a final setup. And if you have gotten everything running, it’s a mess to update because you are in dependency hell, versions will conflict and stop working while in production.