> I know this is an old problem, but I'd like your thoughts.
>
> We need to apply quotas to our students for the obvious reasons, but
> face the old issue of having them hit their quotas and then being unable
> to move forward because deleting mail from the client (SquirrelMail)
> typically means moving the message to trash, requiring two copies of the
> message. This was a known issue when we moved to the system, and we
> accepted it on the basis that our front line support could deal with
> it. It occurred to me, though, that if we made the user.xxx.Trash
> folder a separate quota root with the same quota as their inbox these
> problems would go away. Can anyone see any problems with this ?
Attached patch for squirrelmail fixed it for us. It simply tries to copy
mails to trash on delete, if it fails, the mail is deleted anyway.
Simon
diff -Naur squirrelmail-1.4.4.orig/functions/imap_messages.php squirrelmail-1.4.4/functions/imap_messages.php
--- squirrelmail-1.4.4.orig/functions/imap_messages.php Mon Dec 27 16:03:45 2004
+++ squirrelmail-1.4.4/functions/imap_messages.php Mon Jan 24 14:23:48 2005
@@ -33,7 +33,7 @@
global $move_to_trash, $trash_folder, $uid_support;
$msgs_id = sqimap_message_list_squisher($id);
if (($move_to_trash == true) && (sqimap_mailbox_exists($imap_stream, $trash_folder) && ($mailbox != $trash_folder))) {
- $read = sqimap_run_command ($imap_stream, "COPY $msgs_id \"$trash_folder\"", true, $response, $message, $uid_support);
+ $read = sqimap_run_command ($imap_stream, "COPY $msgs_id \"$trash_folder\"", false, $response, $message, $uid_support);
}
$read = sqimap_run_command ($imap_stream, "STORE $msgs_id +FLAGS (\\Deleted)", true, $response, $message, $uid_support);
}
@@ -850,7 +850,7 @@
global $move_to_trash, $trash_folder, $auto_expunge, $uid_support;
if (($move_to_trash == true) && (sqimap_mailbox_exists($imap_stream, $trash_folder) && ($mailbox != $trash_folder))) {
- sqimap_messages_copy ($imap_stream, $start, $end, $trash_folder);
+ sqimap_run_command ($imap_stream, "COPY $start:$end \"$trash_folder\"", false, $response, $message, $uid_support);
}
sqimap_messages_flag ($imap_stream, $start, $end, "Deleted", true);
}
----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html