Bug 2671 - deleting a folder fails on dovecot server
Summary: deleting a folder fails on dovecot server
Status: RESOLVED WORKSFORME
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Folders/IMAP (show other bugs)
Version: 3.8.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2012-05-31 13:30 UTC by schlittchen
Modified: 2013-08-26 09:33 UTC (History)
0 users

See Also:


Attachments

Description schlittchen 2012-05-31 13:30:04 UTC
Claws-Mail has a bug in it's IMAP handling when trying to delete
a folder. For example, deletion of a folder 'testtest' in INBOX.Trash
is not possible:

[IMAP]	[11:27:31]	111 delete "INBOX.Trash.testtest."
[IMAP]	[11:27:32]	111 NO Invalid mailbox name: INBOX.Trash.testtest.

Basically, the separator appended to the mailbox name is wrong. Older
servers seem to tolerate a trailing separator, because they more or less translate the delete operation into an rmdir(), but dovecot does not. A
detailed discussion of this can be found in the exchange between the dovecot
and the thunderbird developers in the thunderbird bugtracker:

https://bugzilla.mozilla.org/show_bug.cgi?id=301714
Comment 1 Andrej Kacian 2012-05-31 14:50:29 UTC
Can you describe how to reproduce this? Simply creating and deleting such folder works over here (claws 3.8.0, dovecot 2.0.17):

[14:48:50] IMAP4> 57 LIST "" "INBOX.Trash.testtest" 
[14:48:50] IMAP4< 57 OK List completed. 
[14:48:50] IMAP4> 58 CREATE "INBOX.Trash.testtest" 
[14:48:50] IMAP4< 58 OK Create completed. 
[14:48:50] IMAP4> 59 LIST "" "INBOX.Trash.testtest" 
[14:48:51] IMAP4< * LIST (\HasNoChildren) "." "INBOX.Trash.testtest" 
[14:48:51] IMAP4< 59 OK List completed. 
[14:48:51] IMAP4> 60 SUBSCRIBE "INBOX.Trash.testtest" 
[14:48:51] IMAP4< 60 OK Subscribe completed. 
[14:48:54] IMAP4> 61 UNSUBSCRIBE "INBOX.Trash.testtest" 
[14:48:54] IMAP4< 61 OK Unsubscribe completed. 
[14:48:54] IMAP4> 62 DELETE "INBOX.Trash.testtest" 
[14:48:54] IMAP4< 62 OK Delete completed.
Comment 2 Chad Wallace 2012-05-31 20:48:00 UTC
In the Mozilla bug, the first step is to unset "Server supports folders that contain sub-folders and messages" but I don't see an equivalent option in Claws.  

It could be something that is negotiated within IMAP between the client and server.  So, I'm guessing you need to have a Dovecot server that's set up not to allow folders with sub-folders and messages.
Comment 3 Paul 2012-06-04 07:08:19 UTC
Chad, see the information about appending '/' to the folder name on the 'new folder' dialogue.
Comment 4 Colin Leroy 2012-08-29 16:01:02 UTC
The problem also exists the other way for some other servers (or that would be less fun).

What I don't understand is that Claws first tries without separator appended, and only if it fails, add the separator:

[16:00:43] IMAP4> 1200 DELETE "INBOX.Admin.toto" 
[16:00:43] IMAP4< 1200 NO Mailbox does not exist, or must be subscribed to. 
** IMAP error on mail.i-run.fr: DELETE error
[16:00:43] IMAP4> 1201 DELETE "INBOX.Admin.toto." 
[16:00:43] IMAP4< 1201 OK Folder directory delete punted.
Comment 5 Colin Leroy 2012-08-29 16:04:26 UTC
Can you show me show Claws Mail log of a folder-only folder being created then deleted ?
Comment 6 Paul 2013-08-26 09:33:10 UTC
no response in a year, closing now.

Note You need to log in before you can comment on or make changes to this bug.