Mercurial > dovecot > original-hg > dovecot-2.2
changeset 16794:0ec0dc639a54
doveadm sync: When -1 parameter is used, ignore missing mailboxes in source.
Previously the syncs finished with "Mailbox changes caused a desync." and
exit code 2. This was especially common when the destination server had
new autocreated mailboxes and user logged in after the first dsync.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 21 Sep 2013 03:49:22 +0300 |
parents | 2ce07adab319 |
children | 7a4ae8d511a2 |
files | src/doveadm/dsync/dsync-brain-mailbox.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/dsync/dsync-brain-mailbox.c Sat Sep 21 03:40:46 2013 +0300 +++ b/src/doveadm/dsync/dsync-brain-mailbox.c Sat Sep 21 03:49:22 2013 +0300 @@ -623,6 +623,16 @@ } if (box == NULL) { /* mailbox was probably deleted/renamed during sync */ + if (brain->backup_send && brain->no_backup_overwrite) { + if (brain->debug) { + i_debug("brain %c: Ignore nonexistent " + "mailbox GUID %s with -1 sync", + brain->master_brain ? 'M' : 'S', + guid_128_to_string(dsync_box->mailbox_guid)); + } + dsync_brain_slave_send_mailbox_lost(brain, dsync_box); + return TRUE; + } //FIXME: verify this from log, and if not log an error. if (brain->debug) { i_debug("brain %c: Change during sync: "