Hi,

It seems that dsync-2.2.2 doesn't correctly synchronize subscription status
of a deleted mailbox. The situation is as follows.

There are two servers: A and B, and a test user test_mdbox. Mailboxes (mdbox) of this user on both servers are synchronized. Specifically on both of them there is
a Trash/x mailbox. Replication plugin is disabled.

I delete Thrash/x mailbox on A with Thunderbird. The relevant IMAP commands issued
are:

71 87.068176 10.4.0.13 10.1.107.144 IMAP Request: 9 delete "Trash/x" 72 87.072238 10.1.107.144 10.4.0.13 IMAP Response: 9 OK Delete completed. 73 87.073736 10.4.0.13 10.1.107.144 IMAP Request: 10 unsubscribe "Trash/x" 74 87.085263 10.1.107.144 10.4.0.13 IMAP Response: 10 OK Unsubscribe completed.

Inspecting output of 'doveadm mailbox list' and contents of subscriptions file shows that everything is as expected, ie. mailbox was deleted and unsubscribed. Moreover
in dovecot.mailbox.log on A the following records appear:

#480: delete-mailbox 3f3eb117a51c9a51d8280000f671379f (2013-05-20 14:54:40)
#504: delete-dir f91e44cab57821aa456b525c7a2f1d7e (2013-05-20 14:54:40)
#528: unsubscribe f91e44cab57821aa456b525c7a2f1d7e (2013-05-20 14:54:40)

Subsequently I run 'doveadm sync -u test_mdbox -d'. It causes an entry for Thrash/x to reappear in subscriptions file on both servers and the following records are
appended to dovecot.mailbox.log on B:

#2112: delete-mailbox 3f3eb117a51c9a51d8280000f671379f (2013-05-20 14:55:49)
#2136: delete-dir f91e44cab57821aa456b525c7a2f1d7e (2013-05-20 14:55:49)

On A this record is added:

#552: subscribe f91e44cab57821aa456b525c7a2f1d7e (2013-05-20 14:55:49)

So, in described situation, dsync subscribes a mailbox on a server it was deleted on
instead of unsubscribing it on the other one.

--
Karol Jurak

Reply via email to