John Bramley
2005-Jul-21 17:35 UTC
[Dovecot] deleting folders containing subfolders with thunderbird (mbox format) bug
When using Thunderbird (dovecot-0.99.13-3.FC3) on Fedora connecting to dovecot-0.99.13-3.FC3 I am having problems deleting folders which have been created with the 'Allow your new folder to contain: Folders only' option picked. The folder appears to get deleted but upon restarting Thunderbird the folder still appears to be there but clicking on it I get the error: 'The current command did not succeed. The mailserver responded: Mailbox doesn't exist: <mailbox name>'. Upon investigation when creating and deleting a folder called 'bilbo' to contain subfolders only: Thunderbird sends 'create bilbo/' imap command and then 'subscribe bilbo/' Dovecot creates a directory 'bilbo' and adds 'bilbo/' to the .subscriptions file which all works ok. Upon trying to delete the folder and confirming that it should be deleted Thunderbird sends: 'delete bilbo/' dovecot replies 'OK Delete completed' Then thunderbird sends 'unsubscribe bilbo/' dovecot replies 'NO Invalid mailbox name' which Thunderbird ignores and all seems to have gone ok until thunderbird is restarted and the folder reappears in the folder list but nothing can be done with it. I believe that if a client sends an 'unsubscribe' command to a mailbox that is currently subscribed the imap server should unsubscribe it - even if the actual mailbox doesn't exist (unsubscribe and then delete seems to work when testing using telnet to port 143 to send imap commands). Dovecot does allow mailboxes to be unsubscribed if they don't exist if they don't have a tailing '/' character (so deleting folders set to contain only messages in Thunderbird works ok). I expect that everything works ok using Maildir mailboxes because then there is no need to mark folders containing folders with a '/' because all folders can contain messages and folders. For my own purposes I have hacked the mbox_get_mailbox_name_status function in src/lib-storage/index/mbox/mbox-storage.c to add a check to see if the mailbox name is already subscribed to and if it is then return status = MAILBOX_NAME_EXISTS, before the 'if (!mbox_is_valid_create_name(storage, name))' check which is returning status = MAILBOX_NAME_INVALID, which seems to work ok for me. UW-imap works ok I'm surprised at this bug (or am I doing something completely wrong), surely lots of people use Thunderbird with dovecot, do they not create sub-folders in folders, or are they all using Maildir format, or do they never find the 'Server supports folders that contain sub-folders and messages' advanced option so they are never able to create folders within folders in the first place? John.
Timo Sirainen
2005-Jul-22 14:09 UTC
[Dovecot] deleting folders containing subfolders with thunderbird (mbox format) bug
On Thu, 2005-07-21 at 18:35 +0100, John Bramley wrote:> When using Thunderbird (dovecot-0.99.13-3.FC3) on Fedora connecting to > dovecot-0.99.13-3.FC3 I am having problems deleting folders which have > been created with the 'Allow your new folder to contain: Folders only' > option picked. > > The folder appears to get deleted but upon restarting Thunderbird the > folder still appears to be there but clicking on it I get the error: > 'The current command did not succeed. The mailserver responded: Mailbox > doesn't exist: <mailbox name>'.1.0-stable and 1.0-test releases work actually even worse. I added a bug to Mozilla's bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=301714> I'm surprised at this bug (or am I doing something completely wrong), > surely lots of people use Thunderbird with dovecot, do they not create > sub-folders in folders, or are they all using Maildir format, or do they > never find the 'Server supports folders that contain sub-folders and > messages' advanced option so they are never able to create folders > within folders in the first place?Probably some/all of those :) Anyway, I think I'll add a workaround setting for this problem. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20050722/d7c05556/attachment-0001.bin>