[Dovecot] dsync replication available for testing
Timo Sirainen
tss at iki.fi
Sun Mar 4 12:44:46 EET 2012
In dovecot-2.1 hg you can now test dsync-based replication. Everything
isn't finished yet, but it appears to work and I've enabled it for my
@dovecot.fi mails. Some issues:
- public namespace isn't replicated at all
- shared namespace is replicated, but not private mail flags
- I've only tested SSH replication setup now, not director replication
setup (and director setup is still missing many things)
- SSH replication setup uses aggregator process, which isn't really
necessary and can probably be avoided in future
Below is a configuration for virtual user setup. System user
configuration works pretty much the same, except doveadm/ssh is run as root.
Try first that dsync works successfully with ssh in host1:
doveadm sync -u user at domain remote:vmail at host2.example.com
and also in host2:
doveadm sync -u user at domain remote:vmail at host1.example.com
------
mail_plugins = $mail_plugins notify replication
service aggregator {
# give enough permissions for mail processes
fifo_listener replication-notify-fifo {
user = vmail
mode = 0600
}
unix_listener replication-notify {
user = vmail
mode = 0600
}
}
service replicator {
# start replication at startup
process_min_avail = 1
}
plugin {
# host1 replicates to host2
mail_replica = remote:vmail at host2.example.com
# host2 replicates to host1
#mail_replica = remote:vmail at host1.example.com
}
#dsync_remote_cmd = ssh -l%{login} %{host} doveadm dsync-server -u%u
-l%{lock_timeout} -n%{namespace}
service doveadm {
# if you're using a single virtual user, set this to
# start ssh as vmail (not root)
user = vmail
}
More information about the dovecot
mailing list