It looks like this is already the rule for maildir, where one can't remove the folder if any files or subdirectories are present. I'd like to get this option for mbox folders, as I'd like to prevent "accidents" where users accidentally delete large folders by clicking the wrong thing and then too-quickly approving the confirmation dialog that pops up. (Impatient upper level management tends to do this. ;)) BTW, I'm using Mulberry for my client, and it unfortunately puts "Mark contents seen" right next to "Delete folder" on the context menu. I'm aware of the issue so I tend to be extra careful when I finish with the folder associated with a busy mailing list and mark all the uninteresting messages seen.
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..> I'd like to get this option for mbox folders, as I'd like to prevent > "accidents" where users accidentally delete large folders by > clicking the wrong thing and then too-quickly approving the > confirmation dialog that pops up. (Impatient upper level management > tends to do this. ;))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.. Anyway, I guess it would be nice to have this, but I also really hate adding more settings to Dovecot right now. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080804/c8c3fad3/attachment-0002.bin>
On Monday, August 04, 2008 2:41 PM -0400 Timo Sirainen <tss at 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.
It occurs to me that another possibility is to make only the Trash folder maildir, but I think Tbird only allows setting the "folders can contain both messages and folders" option account-wide, not per-folder.