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:
- 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(XXX@example.com)<1363><eZzOJic5vWlTBQAAMBZ7fQ>: Error: brain S: Can't create mailbox Shared/support@example.com: Permission denied doveadm(XXX@example.com)<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?
- 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.
- I log into imap2.example.com and move some messages from Inbox to Drafts and Junk folders.
- On imap1.example.com I run: doveadm sync -s "${state}" -N -l 10 -u ${user:?} ${server:?}
- I log into imap1.example.com and sometimes observe the recently moved messages missing from Drafts and/or Junk folders.
- 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?
participants (1)
-
cryintothebluesky@gmail.com