Thanks Bill for the kind suggestion.
regards
Bill Cole wrote:
On 19 Nov 2019, at 1:04, Merrick wrote:
Hello,
We plan to setup two postfix as MX servers.
One is in west location, such as CA state.
Another is in east location, such as NYC.
The usefulness of such an architecture in modern times is marginal. If
the "4th nine" (or maybe 5th) is worth doubling your hard costs and
possibly doing worse to your support costs, go for it. As an example,
one 2-node mail cluster I manage has had a bit less than 2 hours of
downtime per node in the past year, all of it for scheduled updates, so
the whole system has never been unavailable but if it was a single node
it would only have been out for 2 hours of our own choosing: 99.977%
available even without a "planned downtime" exemption. The second node
takes us to 100% but at a significant cost of technical and human
resources.
The question is, how to make storage shared by two MX servers?
The messages should be stored in one place, such as webmail/IMAP could
read all messages directly from this location.
This is not something Postfix would handle. When acting as a MX server,
Postfix accepts messages and (except in cases of extreme load or
malfunction) passes them in sub-second time to Something Else that
manages the storage of and access to delivered mail. Sometimes that's
just files on disk that can be accessed by traditional mail tools
(mail/mailx, mutt, etc.) or by IMAP /POP/webmail servers. Sometimes it
is an independent delivery agent that is handed messages over LMTP or a
pipe or more arcane mechanisms (see master.cf's often-commented lines
for delivery mechanisms Postfix can do.)
What you are looking for is either an independent IMAP server OR
synchronized IMAP servers. Typically webmail accesses delivered mail via
IMAP. https://wiki.dovecot.org/Replication explains one way to synch 2
or more IMAP servers, using Dovecot. Cyrus IMAP also has a mechanism for
it. If you are committed to truly singular storage, a single IMAP server
apart from the MX servers would suffice, but I don't think that's a
sensible architecture because it makes the solitary IMAP server a single
point of failure. Replication allows each node to stand on its own if
the other(s) fail, and avoids the problems of treating distant storage
as local.
It is also possible to use a commercial mail clustering solution, such
as CommuniGate Pro. I hear Microsoft has some sort of supposed
multi-node mail system as well... One might expect a commercial solution
to be a simpler tool to support but one might be surprised.