Re: [Imap-uw] Problem deleting folders with Thunderbird
On Thu, 21 May 2009, Mark Crispin wrote: On Thu, 21 May 2009, Andrew Daviel wrote: If in Thunderbird the option server supports folders which can contain both folders and messages is checked No client should ever have, or need, such a configuration option. This is handled by the IMAP protocol. With the option set, the GUI has a single option create subfolder. With it clear, it asks if you want a folder or a directory. As far as I can see, with MBX or Unix, create test will do open (test, O_RDWR) and create test/ will do mkdir (test). In RFC 3501 you say If the mailbox name is suffixed with the .. hierarchy separator .. the client intends to create mailbox names under this name. Which implies that the client needs to know which to create. Since the server workings are (rightly) hidden from users, and the paradigm is that a folder on a GUI desktop contains both files and folders, users will assume that a folder can contain both subfolders and messages. Maybe I am missing something, but I can't see anything in the protocol for a client to determine whether a server can create subfolders without testing it. Andrew ___ Imap-uw mailing list Imap-uw@u.washington.edu http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
Re: [Imap-uw] Problem deleting folders with Thunderbird
On Fri, 22 May 2009, Andrew Daviel wrote: If in Thunderbird the option server supports folders which can contain both folders and messages is checked No client should ever have, or need, such a configuration option. This is handled by the IMAP protocol. With the option set, the GUI has a single option create subfolder. With it clear, it asks if you want a folder or a directory. The missing piece of your puzzle is that it is perfectly reasonable to have a directory-only object in a dual-use work where a name can be both a mailbox and a directory. Consider USENET newsgroups. The fact that comp.mail.pine and comp.mail.imap both exist does not mean that there is a mailbox called comp or comp.mail. Yet both comp and comp.mail are superior directories of comp.mail.imap and comp.mail.pine. The same thing happens in IMAP mailboxes. You can create directories to hold mailboxes without making them also be mailboxes. The only thing that changes with dual-use mailbox names is to allow a mailbox to also act as a directory. This also happens if you delete a mailbox that has children. This causes the mailbox to become a directory, since the children are not deleted. That is, if you have the following mailboxes: junk junk/crap junk/cruft and you then delete junk, then you still have a directory named junk containing mailboxes junk/crap and junk/cruft. As far as I can see, with MBX or Unix, create test will do open (test, O_RDWR) and create test/ will do mkdir (test). Yes. mbx and unix as single-use mailbox formats. In RFC 3501 you say If the mailbox name is suffixed with the .. hierarchy separator .. the client intends to create mailbox names under this name. Which implies that the client needs to know which to create. Correct. Which is why the server supports folders which can contain both folders and messages option is stupid. Since the server workings are (rightly) hidden from users, and the paradigm is that a folder on a GUI desktop contains both files and folders, users will assume that a folder can contain both subfolders and messages. Why? Is it because of the stupid name folder and what it meant on the Macintosh? I have yet to hear anyone saying that files should contain other files. Yet that is what these poorly-designed GUIs are doing. Maybe I am missing something, but I can't see anything in the protocol for a client to determine whether a server can create subfolders without testing it. That's because that's the wrong thing to test. It has NOTHING to do with what a server can do, and EVERYTHING to do with the underlying mail store. The client needs to declare what type of object to create. Either it creates a directory, or it creates a mailbox. In the case of creating a mailbox, it can then determine -- AFTER the mailbox is created -- whether it is also a directory. That client decision point is ALWAYS there. -- Mark -- http://panda.com/mrc Democracy is two wolves and a sheep deciding what to eat for lunch. Liberty is a well-armed sheep contesting the vote. ___ Imap-uw mailing list Imap-uw@u.washington.edu http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
Re: [Imap-uw] Problem deleting folders with Thunderbird
On Thu, 21 May 2009, Andrew Daviel wrote: If in Thunderbird the option server supports folders which can contain both folders and messages is checked No client should ever have, or need, such a configuration option. This is handled by the IMAP protocol. (the default, which is true for MIX) then it creates a folder test with no suffix, listed as such in .mailboxlist. If the option is unchecked, it appends a / when it creates a directory and not when it creates a folder. This indicates that the developers of Thunderbird don't have a clue about IMAP. This has been a problem since the bad old days of Netscape Messenger. In IMAP, CREATE using the form with no hierarchy delimiter suffix means create a container that holds messages (a mailbox), and the form with hierarchy delimiter suffix means create a container that holds other containers (a directory). This has nothing to do with whether or not the server allows a mailbox to be a directory as well. There is no need for that configuration switch. 15 list Trash/test2/* * LIST (\HasNoChildren) / Trash/test2/ 15 OK LIST completed This is because Trash/test2/ matches the pattern but Trash/test2 does not. 16 delete Trash/test2/ 16 OK DELETE completed This is because the name Trash/test2/ resolves as a mailbox. 17 unsubscribe Trash/test2/ 17 NO Not subscribed to mailbox Trash/test2/ This is because Trash/test2/ is not in the mailbox list. The subscription list can best be thought of as being like a bookmarks file. The fact that http://www.example.com and http://example.com might take you to the same page does not mean that the two names match in the bookmarks. 71 create test3f/ 71 OK CREATE completed 72 subscribe test3f/ * NO CLIENT BUG DETECTED: subscribe of non-mailbox directory test3f/ 72 OK SUBSCRIBE completed As the server said, test3f/ is a non-mailbox directory and shouldn't be subscribed. 30 unsubscribe test3f/test4/ 30 NO Not subscribed to mailbox test3f/test4/ Once again, that is not the name that is in the subscription list. I do see an inconsistancy here, that when Thunderbird deletes the message folder it appends a /. However, imapd successfully deletes it even though it does not exactly match the name given while creating it. The name with the / appended works when accessing it as a mailbox. The case where it doesn't work is when you are trying to look up the name in the subscription list. Is it fair to say that Thunderbird has a bug because it uses a different folder name for creation and deletion, Yes. and/or that imapd is inconsistent in its treatment of deletion vs. unsubscription ? No. The behavior of the trailing / form is undefined in the specification for all commands other than CREATE. As a courtesy, imapd allows the trailing / form for command which actually access a mailbox. The subscription commands do not access a mailbox; they merely manipulate a list of names. The LIST command returns that form for the foo/* case in order to verify that the superior exists at all. Otherwise, there would be no difference between foo is empty and foo does not exist. Other servers may behave differently; but in any case any client that uses the suffix form for anything other than CREATE is broken. -- Mark -- http://panda.com/mrc Democracy is two wolves and a sheep deciding what to eat for lunch. Liberty is a well-armed sheep contesting the vote. ___ Imap-uw mailing list Imap-uw@u.washington.edu http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
[Imap-uw] Problem deleting folders with Thunderbird
We have a problem with users trying to delete folders using Thunderbird. Part of it is a TB problem IMO (some discussion with Mark a while back; TB is trying to delete an open folder without deselecting it). However, another issue seems to be that imapd is not unsubscribing from the deleted folder properly from network capture: 3 list Trash/test/* * LIST (\HasNoChildren) / Trash/test/ 3 OK LIST completed 4 delete Trash/test/ 4 OK DELETE completed 5 unsubscribe Trash/test/ 5 NO Not subscribed to mailbox Trash/test/ 6 logout - at this point, Trash/test/ has disappeared from the filesystem, but there is still an entry Trash/test in .mailboxlist. Thunderbird seems to ignore error status and thinks it has successfully unsubscribed - the icon disappears. But after exiting and restarting (logging in again), the icon reappears pointing to a mailbox that cannot be selected. imapd-2007, as I recall https://bugzilla.mozilla.org/show_bug.cgi?id=357911 I submitted 414101 now marked as a duplicate -- Andrew Daviel, TRIUMF, Canada Tel. +1 (604) 222-7376 (Pacific Time) Network Security Manager ___ Imap-uw mailing list Imap-uw@u.washington.edu http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
Re: [Imap-uw] Problem deleting folders with Thunderbird
On May 14 2009, Mark Crispin wrote: On Thu, 14 May 2009, Andrew Daviel wrote: 5 unsubscribe Trash/test/ 5 NO Not subscribed to mailbox Trash/test/ - at this point, Trash/test/ has disappeared from the filesystem, but there is still an entry Trash/test in .mailboxlist. Look at the above very carefully. imapd says that Trash/test/ is not subscribed. The .mailboxlist file shows that Trash/test is subscribed. Note the difference in the two strings. Just to be explicit, the moral of the story is that using subscriptions is not a good idea because every client is stupid in their handling of subs, and worse, they're all stupid in slightly different ways. -Brian ___ Imap-uw mailing list Imap-uw@u.washington.edu http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
Re: [Imap-uw] Problem deleting folders with Thunderbird
On Thu, 14 May 2009, Brian Hayden wrote: Just to be explicit, the moral of the story is that using subscriptions is not a good idea because every client is stupid in their handling of subs, and worse, they're all stupid in slightly different ways. Correct. The ONLY valid use for subscriptions is if a server exports netnews groups or similar functionality. This allows the user to keep a list of which newsgroups he is subscribed to. Now that netnews is effectively dead, the purpose and use of IMAP subscriptions should die with it. Any client which do a LIST * and subscribe all the names returned is broken by design. This means you, Outlook and Thunderbird. That practice is completely unnecessary, and is based upon false folklore. -- Mark -- http://panda.com/mrc Democracy is two wolves and a sheep deciding what to eat for lunch. Liberty is a well-armed sheep contesting the vote. ___ Imap-uw mailing list Imap-uw@u.washington.edu http://mailman2.u.washington.edu/mailman/listinfo/imap-uw