Tracker: Current Stable Branch (1.4)

7 patch for over quota/move_to_trash fail - ID: 646386
Last Update: Comment added ( tokul )

Because SquirrelMail has to copy a message to the trash
folder *before* deleting it, we run into a situation
where a user over quota who has move_to_trash turned on
cannot delete any messages. In fact, even if the
message didn't have to be copied before deletion this
would present a problem depending on how over quota a
user is and how big the deleted message is. One
possible approach would be to disable quotas on each
users' Trash folders, but that's not a very pleasant
solution. Instead, I've grabbed the quota functions out
of Bill Shupp's quota_usage plugin and integrated them
into sqimap_messages_delete(). There is a namespace
collision with the quota_usage plugin because Bill
opted to use sqimap_get_quota() as the name for his
function, which is IMO the most reasonable name for the
one I put in imap_messages.php, but since they work the
same it's a minor fix.

I've attached a unified diff against SquirrelMail 1.2.9.


Mike Markley ( madhack ) - 2002-12-01 12:04

7

Closed

Fixed

Tomas Kuliavas

None

None

Public


Comments ( 3 )

Date: 2006-09-30 10:26
Sender: tokul

Logged In: YES
user_id=225877

SquirrelMail 1.5.2cvs and 1.4.9cvs ignore message copy
errors when messages are deleted.

Interface tries to copy message to trash and then tags it as
deleted. If we can store message in trash, message is
stored. If we can't, trash folder is bypassed.

IMAP QUOTA extension can't be used, because some servers
(UW) don't support it.


Date: 2006-09-25 20:29
Sender: tokul

Logged In: YES
user_id=225877

We could also just ignore message copy to trash error and
tag oversized message as deleted after failed 'copy to
trash' command.


Date: 2005-04-06 22:12
Sender: kinkProject AdminAccepting Donations

Logged In: YES
user_id=285765

Thank you for your patch. This problem is solved in our
current SquirrelMail version by the "Bypass Trash" modifier
for Delete.


Attached File ( 1 )

Filename Description Download
delete_quota_hack.txt Unified diff (against SM 1.2.9) of fix Download

Changes ( 12 )

Field Old Value Date By
status_id Open 2006-09-30 10:26 tokul
close_date 2005-04-06 22:12 2006-09-30 10:26 tokul
resolution_id Out of Date 2006-09-30 10:26 tokul
assigned_to nobody 2006-09-25 20:29 tokul
status_id Closed 2005-04-08 16:55 kink
data_type 423679 2005-04-08 16:55 kink
category_id Folders 2005-04-08 16:55 kink
resolution_id None 2005-04-06 22:12 kink
status_id Open 2005-04-06 22:12 kink
close_date - 2005-04-06 22:12 kink
priority 5 2002-12-20 12:10 kink
File Added 36573: delete_quota_hack.txt 2002-12-01 12:04 madhack