Hello, I have two replica IMAP servers both running dovecot-2.4.2:

imap1.example.com
imap2.example.com

I'm observing the following issues when replicating mailboxes with doveadm sync:

1. Permission errors with public and shared mailboxes

For this test I delete all mailboxes on imap2.example.com and then use full 
sync from imap1.example.com to replicate mailboxes:
# doveadm sync -f -s "" -N -l 10 -u ${user:?} ${server:?}

The first time I run this command, the following error messages are logged:
doveadm([email protected])<1363><eZzOJic5vWlTBQAAMBZ7fQ>: Error: brain S: Can't 
create mailbox Shared/[email protected]: Permission denied
doveadm([email protected])<1334><ZV88Byg5vWk2BQAAMBZ7fQ>: Error: brain S: Can't 
create mailbox Public/Test: Permission denied

If I wait 10 seconds and run the same sync command again, all mailboxes are 
replicated correctly. This only happens with public and shared mailboxes.

I'm not sure of the exact cause, but it looks as if there is a race condition, 
where on the target server replicated ACLs are not applied immediately and this 
results in permission errors. Can anyone confirm the root cause?


2. Mailboxes are not always synchronised correctly

For this test I'm using stateful sync. The man page states it performs a 
two-way sync, hence both server should end up with the same state.

1) I log into imap2.example.com and move some messages from Inbox to Drafts and 
Junk folders.
2) On imap1.example.com I run: doveadm sync -s "${state}" -N -l 10 -u ${user:?} 
${server:?}
3) I log into imap1.example.com and sometimes observe the recently moved 
messages missing from Drafts and/or Junk folders.
4) The only way to resolve this issue is to either run full sync from 
imap1.example.com or to run another stateful sync but from imap2.example.com.

Can anyone confirm if this is a bug or if stateful sync is required to be run 
on both IMAP servers against each other?
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to