Bug with shared access to mailbox

John van jkamp at amazon.com
Mon Aug 15 08:21:42 UTC 2016


On 03-06-16 08:20, aki.tuomi at dovecot.fi (Aki Tuomi) wrote:
> On 30.05.2016 16:41, van der Kamp, John wrote:
>> Hello,
>>
>> I'm testing dovecot with some setups, and one of them is with shared
>> mailboxes. The test I wrote will create and delete mail using multiple
>> connections to the same user and folder. Each connection makes a couple of
>> mails, remembers the uid from APPENDUID, and will delete those emails again.
>> At the end of the test I expect an empty folder.
>>
>> This is not what happens. At the end I still have several mails in the
>> folder. I lack insight in the dovecot source to tell exactly what's going
>> on. I've tested this with different setups:
>> 1) local system user, connecting over localhost -> bug is present
>> 2) local system user, connecting over internet -> bug is present, but is
>> harder to reproduce
>> 3) dovecot as proxy to another imap server -> bug is present
>> In step 3, you can even setup a dovecot to be a proxy to another dovecot
>> server.
>>
>>   From logging in the other imap server I've seen that a client command to the
>> proxy like:
>> TAG UID STORE 1:3 +FLAGS (\Deleted)
>> TAG UID EXPUNGE 1:3
>> will be sent to the other imap server in 3 steps, one for each message. When
>> running the test with multiple threads, that logging shows that some uids
>> are never sent to the other imap server, and some uids are sent over
>> different connections than they original were sent to. (Thread 1 deletes
>> 1:3, Thread 2 deletes 4:6, the proxy of Thread 1 might expunge messages from
>> Thread 2 and vice versa).
>>
>> Attached is a python script which tests the behavior. The script expects a
>> file named "testmail.eml" to upload to the imap server. I used an email
>> which was about 75 kB.
>> I tested using version: 2.2.22 (fe789d2).
>> Let me know if I can help in any other way too.
>>
>> John
>>
> Hi!
>
> We tested with 2.2.24, and were unable to reproduce the error. Can you
> try again with 2.2.24?
>
> Aki
>
Hi,

Sorry for the late reply. Didn't notice when this was picked up.
I've tried again with out-of-the-box Ubuntu Xenial 16.04, which ships 
with 2.2.24. Here the problem is still present. I patched the packages 
with the commits Timo mentioned in another reply. That did not fix the 
problem the python script tries to reproduce.

I tried 2.2.25 on a Debian testing installation. This too is just 
out-of-the-box local users with mailbox in homedir configuration. I had 
to run the script a couple of times before it showed up again. So I 
guess things have been made better, but not flawless.

John


More information about the dovecot mailing list