Gentlemen, I've setup 2 servers with dsync replication and hit a serious issue - some messages got duplicated thousands times in some shared mailboxes(~5). There is actually no reason to replicate anything from shared name space and I've tried to limit replication scope with just 'inbox' name space but it didn't help. dovecot version ||2.2.18 (2de3c7248922) errors in the logs May 26 13:23:38 mx10 dovecot: doveadm: Error: dsync-remote(korobova at mydomain): Error: Mailbox turkey: Save commit failed: Message has been copied too many times (24498 + 8270) May 26 13:25:16 mx10 dovecot: doveadm: Error: dsync-remote(korobova at mydomain): Error: Mailbox turkey: Save commit failed: Message has been copied too many times (24498 + 8270) May 26 13:26:40 mx10 dovecot: dsync-local(zhelonkina at mydomain): Error: Mailbox booking: Save commit failed: Message has been copied too many times (0 + 32768) May 26 13:30:01 mx10 dovecot: dsync-local(kashchits at mydomain): Error: Mailbox shared/davydjanc at mydomain/russia: Save commit failed: Message has been copied too many times (17139 + 15629) May 26 13:30:01 mx10 dovecot: dsync-local(davydjanc at mydomain): Error: Mailbox russia: Save commit failed: Message has been copied too many times (17139 + 15629) May 26 13:30:01 mx10 dovecot: dsync-local(kapitanova at mydomain): Error: Mailbox shared/davydjanc at mydomain/russia: Save commit failed: Message has been copied too many times (17139 + 15629) May 26 13:30:03 mx10 dovecot: dsync-local(grinenko at mydomain): Error: Mailbox shared/davydjanc at mydomain/russia: Save commit failed: Message has been copied too many times (17139 + 15629) May 26 13:30:03 mx10 dovecot: dsync-local(maslova at mydomain): Error: Mailbox shared/davydjanc at mydomain/russia: Save commit failed: Message has been copied too many times (17139 + 15629) Data was not lost and I've been able to run deduplicate for most of mailboxes, but one mailbox got broken and I had to manually move message to another mailbox force-resync failed fot that mailbox doveadm(l.davydjanc at mydomain): Error: mdbox map /srv/vmail/current/mydomain/davydjanc/storage/dovecot.map.index corrupted: map_uid=361735 refcount too low Hope you guys have an idea how to work it around :) replication.conf dsync_remote_cmd = /usr/bin/ssh -i /home/vmail/.ssh/id_rsa -l %{login} %{host} doveadm dsync-server -u %u service aggregator { fifo_listener replication-notify-fifo { user = vmail mode = 0600 } unix_listener replication-notify { user = vmail mode = 0600 } process_min_avail = 1 } service replicator { unix_listener replicator-doveadm { user = vmail mode = 0600 } process_min_avail = 1 } service doveadm { user = vmail process_min_avail = 1 } service config { unix_listener config { user = vmail } process_min_avail = 1 } replication_max_conns = 50 replication_dsync_parameters = -d -n inbox -l 30 -U plugin { mail_replica = remote:vmail at mx20 } doveconf -n # 2.2.18 (2de3c7248922): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.8 # OS: Linux 3.13.0-34-generic x86_64 Ubuntu 14.04.2 LTS xfs auth_cache_negative_ttl = 0 auth_cache_size = 512 M auth_default_realm = mydomain auth_failure_delay = 5 secs auth_worker_max_count = 4096 default_client_limit = 40960 default_process_limit = 8192 default_vsz_limit = 2 G disable_plaintext_auth = no first_valid_gid = 500 mail_location = mdbox:/srv/vmail/current/%d/%n mail_plugins = acl zlib notify replication mail_shared_explicit_inbox = yes managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mdbox_rotate_size = 32 M namespace { list = yes location = mdbox:/srv/vmail/current/%%d/%%n prefix = shared/%%u/ separator = / subscriptions = no type = shared } namespace inbox { inbox = yes location mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix separator = / } passdb { args = /etc/dovecot/virtual/base.conf.ext driver = sql } passdb { args = /etc/dovecot/virtual/master.conf.ext driver = sql } plugin { acl = vfile acl_shared_dict = file:/srv/vmail/current/shared.db/000-shared-mailboxes.db sieve = file:/srv/vmail/current/%d/%n/sieve;active=/srv/vmail/current/%d/%n/active.sieve sieve_max_redirects = 0 zlib_save = xz zlib_save_level = 6 } protocols = " imap lmtp sieve" service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } service imap-login { process_min_avail = 24 } service imap { process_limit = 4096 } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } ssl_cert = </etc/ssl/mxbgcom/2015/mydomain.com.crt.chained ssl_key = </etc/ssl/mxbgcom/2015/mydomain.com.key syslog_facility = local0 userdb { args = /etc/dovecot/virtual/base.conf.ext driver = sql } protocol lmtp { mail_plugins = acl zlib notify replication sieve } protocol imap { mail_max_userip_connections = 15 mail_plugins = acl zlib notify replication imap_acl } -- Best regards, Sergey Schwartz Senior System Administrator Biblio Globus Tour Operator www.bgoperator.ru T: +7 495 5042500 ext 1532 E: sergey.schwartz at bgoperator.com