We have two sites each with an MTA and MX record. We think about introducing CipherMail into our infrastructure.
Obviously, there is a way using MariaSQL/MySQL and Galera Cluster, HAproxy, ... to create a "real" cluster. With at least three nodes and a lot of overhead, this seems to be a little too much for our use case.
I thought of a solution with PostgreSQL, backup, transfer backup to the other site, restore there, automated as a cron job.
Configuration would only be possible on the "master" site, but that's okay.
The database on the "slave" site would be overwritten regularly.
In your opinion, what do you think would be a simple solution for my use case?
Would my idea even work?
The best setup is to use a master/master database like Galera. If you
use a primary and secondary server, you need to make sure you never
write data to the secondary server because that will be overwritten
when the primary server syncs to the secondary server.
The secondary server will add or update the database in various cases.
For example if you receive digitally signed email, the certificate will
be extracted and added to the database. Or, if you send a PDF encrypted
email with the password auto-generated, a user object for the recipient
will be added. If this happens on the secondary server, those changes
will be overwritten.
The best setup is therefore to use a master/master database.
If you use a primary/secondary database, make sure all database changes
are applied to the primary database. This requires that a fail-over is
done to the secondary when the primary fails.
If you can be certain that changes are only applied to one database
(primary), then you can periodically sync the primary to the secondary
database without fail-over.
Kind regards,
Martijn Brinkers
ยทยทยท
On Tue, 2021-06-01 at 05:24 +0000, tbahn--- via Users wrote:
We have two sites each with an MTA and MX record. We think about
introducing CipherMail into our infrastructure.
Obviously, there is a way using MariaSQL/MySQL and Galera Cluster,
HAproxy, ... to create a "real" cluster. With at least three nodes
and a lot of overhead, this seems to be a little too much for our use
case.
I thought of a solution with PostgreSQL, backup, transfer backup to
the other site, restore there, automated as a cron job.
Configuration would only be possible on the "master" site, but that's
okay.
The database on the "slave" site would be overwritten regularly.
In your opinion, what do you think would be a simple solution for my
use case?
Would my idea even work?
--
CipherMail email encryption
Email encryption with support for S/MIME,
OpenPGP, PDF Messenger and Webmail Messenger
Only about 5 percent of "good mails" are routed through the secondary MTA. Thus, I'd get a "nondeterministic" behavior, if for some reason the first email of a new external address would be routed through the secondary server. At the moment, I think, we won't use PDF encryption at all, but...
I had a deeper look at Galera cluster, and I'll most probably go this way - as you proposed.