[Discuss] Kubernetes Re: Backup Postfix/Dovecot E-mail Server?

Rich Braun richb at pioneer.ci.net
Tue Dec 4 15:48:05 EST 2018


Kent Borg <kentborg at borg.org> wrote:
> Set up something more clever that keeps the primary and backup in sync 
> so both IMAP servers hold the same messages.
(then more suggestions)
> Yes, I've done that before. But then what?

My solution has evolved from a single exim/elm server to what I have today, a 3-node Docker swarm, and what I'll have in a few weeks, Kubernetes.

Where I once spent upwards of $1500 on a node, requirements are much less costly today: either an old motherboard with 8GB to 16GB of RAM, or a new Intel NUC ($170) J5005 CPU with 16GB of RAM ($110) and 500GB of SSD ($75) so a brand-new 3-node cluster costs just over $1000 and burns only about 30W electricity.

Once you have 3 nodes instead of 2, then you start thinking about clustering: self-healing recovery from any failure, meaning that you can yank the cords out of any unit, plug in a spare and expect that the failed node will automatically sync with the others.

In 2013 that led me to LXC. In 2016-17 I converted everything over to Docker. Now I'm swapping most of that out for Kubernetes (it's the tool used by Google to build its data centers). The learning curve for these technologies is daunting but I share my open-source learning here:

https://github.com/instantlinux/docker-tools

There you will find my images for email (dovecot, postfix, spamassassin, rainloop, squirrelmail) along with the tools to build a high-availability cluster that won't need much maintenance effort once you get it working. I relay my inbound email through EasyDNS, a Canadian company that will spool messages for up to several days in the event of outages. But I never have outages anymore. :-)

-rich



More information about the Discuss mailing list