mox icon indicating copy to clipboard operation
mox copied to clipboard

Running two mox servers and syncing with them

Open exander77 opened this issue 1 year ago • 3 comments

I would like to run two mox servers in different location with one primary and one secondary and syncing data between them.

How to achieve this?

exander77 avatar Oct 14 '24 23:10 exander77

This is not currently possible with mox, I think it will come at some point in the future. The complication is that quite some state should be synchronized between the mail servers. Not just which accounts exists. But also historic classifications: That's what mox uses for its junk filtering. If the secondary MX is independent, it couldn't do (the same) proper junk filtering, and spammers would just get email delivered through the secondary MX, bypassing any filtering on the first.

I think this will require changes relatively deeply in the database storage layer to do the synchronization. Probably with some proper failover mechanism. It's a relatively big feature, and I would want it to solve the problem in an easy to use way (configure the primary with the address & keys of the secondary, then install a mox in secondary mox on a new machine and configure it with the key of the primary, and have it all work automatically from there on).

Also see https://www.xmox.nl/faq/#hdr-how-do-i-configure-a-second-mox-instance-as-a-backup-mx

mjl- avatar Oct 18 '24 13:10 mjl-

I like the idea of primary and secondary, like I have it with DNS server.

It has to synchronize everything, both in real time and historically, if one instance was unavailable for a while. Kinda like, master-master replication.

exander77 avatar Oct 18 '24 18:10 exander77

not realtime, but have a look at https://www.offlineimap.org/ its my go to tool to migrate imap-mailboxes and you can also run it as deamon to sync every few minutes

TabTwo avatar May 29 '25 12:05 TabTwo