[exim] recalculate quota and maildirsize problem

Top Page
Delete this message
Reply to this message
Author: Andrey
Date:  
To: exim-users
Subject: [exim] recalculate quota and maildirsize problem
Hello,

I have discovered one problem while using Exim 4.66 and
maildir_use_size_file option in appendfile transport. Courier-IMAP is
compiled without including Trash quota.

Let's consider the following example.

I have 1Mb quota for my maildir and have the following maildirsize file:

------------------------
1048576S,0C
300000 1
300000 1
300000 1
-----------------------

And 3 these files are in cur folder on ther server.

Then I perform the following steps:

1. Open mail client and delete 1 big files (it moves to Trash folder in
client). In this case this message is copied from cur to .Trash folder
on the IMAP server and also this message is marked with flags S and T in
cur folder. So now 1 file in .Trash folder and 3 files in cur folder.

maildirsize file after that:

------------------------
1048576S,0C
300000 1
300000 1
300000 1
    -300000 -1
------------------------


2. Then I'm trying to send next big file with 600000 size to go over
the quota. This enforces recalculating of maildirsize file from scratch.
New maildirsize file after that:

------------------------
1048576S,0C
1200000 4
------------------------

3. Then I'm closing the client and now 2 files are in cur and 1 file in
.Trash folder.


4. Now I'm opening the client and delete 1 file from .Trash and
maildirsize file will be the same after that:

------------------------
1048576S,0C
1200000 4
------------------------

But now I have only 2 files in cur folder and its sum size is 600000.

What's wrong? Even if I add maildir_quota_directory_regex =
^(?:cur|new|\.(?!Trash).*)$ in appendfile transport maildirsize file
will be wrong after steps above because message with T flag will be
considered while recalculating quota from scratch.

Is that a problem that Courier-IMAP compiled without including Trash
folder while manipulating maildirsize? I think no, because if we go over
the quota maildirsize file is recalculated from scratch and appendfile
transport just get sum of dirs un Maildir.

Is that right that appendfile transport consider messages with T flag
when recalculating quota?

Thanks.