Hello Sam,
The Sqwebmail shouldn't touch a maildirsize file if a user moves
a message from the Trash to another folder, because the message
isn't purged and still exists in a user Maildir. Now the Sqwebmail
subtracts a size of a message, so a user's quota is calculated
badly.
I've fixed it and my patch is below:
--- courier-0.53.1.20060502/webmail/maildir.c-orig 2004-10-22 01:49:52.000000000
+0200
+++ courier-0.53.1.20060502/webmail/maildir.c 2006-05-18 15:20:59.000000000
+0200
@@ -890,16 +890,16 @@
|| !maildirquota_countfolder(destdir)) &&
maildirquota_countfile(file))
{
-
if (!from_shared)
maildir_quota_deleted(".", -filesize, -1);
}
- else if (!dest_shared && maildirquota_countfolder(destdir) &&
- (from_shared || !maildirquota_countfolder(fromdir))
- )
+ else if ((!dest_shared && maildirquota_countfolder(destdir) &&
+ (from_shared || !maildirquota_countfolder(fromdir))) ||
+ (!dest_shared && maildirquota_countfolder(destdir) &&
+ !from_shared && maildirquota_countfolder(fromdir) &&
+ strcmp(from, INBOX "." TRASH) == 0))
/* Moving FROM trash */
{
-
if (maildir_quota_add_start(".", "ainfo,
filesize, 1, NULL))
{
It's rather a dirty hack, because at first I add a size of a message
to a maildirsize file and next it's subtracted from the file by
maildir_newcheck() function. In the maildirsize file we have
the following lines then:
<msg_size> 1
-<msg_size> -1
Please fix it better if you know how to do it :)
Have a nice day,