Saturday, 10 August 2013

Sync between two Mail Servers

Sync between two Mail Servers

I have 2 mail servers of the same configuration which is as follows:
OpenLDAP (for authntication of users)
Postfix
Cyrus-imapd
SOGo(groupware)
One of them (Let's say X) is in production and is the primary mail server.
The other server (Let's say Y) has the exact same configuration as X - the
same directory structure, the same users, same postfix and cyrus
configuration. I want to know a way to make this a backup mail server,
where:
if the user changes his/her password (or any LDAP relates field like
designation or whatever) in X, it changes in Y too.
the mailboxes for each users syncs periodically between X and Y
Possible Solutions:
for the second requirement, I was thinking of writing a shell script which
invokes a service like imapsync and then syncs. Set a cron job for this.
However, I don't know if that is the optimal way to do it. And, in my
mind, this is ok only when the number of users are less; if they number in
thousands, would this be feasible? (I was also thinking maybe there is a
way where when X receives a mail, maybe I could configure Postfix to send
it to Y)
As for the first question (LDAP), I've read something about LDAP
replication w.r.t slurpd and syncrepl but don't know which to use or
whether it is really suited my needs.

No comments:

Post a Comment