On Monday, August 04, 2008 2:41 PM -0400 Timo Sirainen <tss@iki.fi> wrote:
On Aug 4, 2008, at 2:23 PM, Kenneth Porter wrote:
It looks like this is already the rule for maildir, where one can't remove the folder if any files or subdirectories are present.
Oh? I don't remember this kind of a feature..
Just went looking at the 1.1.1 code again and mis-remembered what I saw. I was looking at mbox_list_delete_mailbox and it was the mbox "folder that contains folders" behavior I was remembering. It will only unlink a folder if it contains no subfolders. ISTM that it should either recursively delete for consistency, or not delete non-empty "folder that contains messages" folders. Or does the standard require different behavior here?
The problem is that I think this should be more of a per-client setting rather than a global setting. For example with Thunderbird (well, and non-mboxes) deleting the mailbox just renames it under Trash. Disallowing that would be annoying. And I suppose this issue really should be handled by the client UI instead of the server..
Note that "renaming" under Trash won't work if Trash is mbox, because mbox can't have subfolders. (Or did this change in Dovecot in 1.1.2?)
I'd be happy to get this functionality as a plugin, but I haven't been able to get my head around how to write a plugin. It looks like some variation of the ACL plugin might do the job, since it also establishes restrictions on whether a delete can go through.