On Fri, 19 Sep 2003, Henry Baragar wrote: >Why does Binc map all /folder, folder, folder/ to folder? Why not map >/folder to .folder and folder/ to folder.?
Binc tries to resemble natural filesystem semantics, with relative paths although the "current working dir" is the root. If you first do a cd / as root in a unix filesystem, then 'touch a' or a 'touch /a' - then 'ls' will in both cases return the same filename. 'touch a/' is not allowed, since the slash implies that you're touching a directory. But Binc doesn't differ between a directory and a file - it's all mailboxes. And a mailbox can contain a mailbox, acting as a directory, or it can contain messages, acting as a file (dual-use). In that sense, CREATE folder CREATE /folder CREATE folder/ are all equivalent, "create a mailbox called 'folder' at the root of the depository". Now LIST is the equivalent of "ls", and in all the touch-cases "ls" will return the exact same name. As does LIST. SUBSCRIBED is the equivalent of "echo <something> >> .bincimap-subscribed". LSUB is the equivalent of "cat .bincimap-subscribed". UNSUBSCRIBE is the equivalent of removing the first occurrance of something in .bincimap-subscribed (like a simple perl script). Whatever people want to store in their subscription list is fine, and Binc will also decorate the list with information about what is selectable and not (\Noselect), and what contains recent messages and not (\Marked). Other than that the subscription list is a playground for clients. >Some interesting tidbits: >1. Creating "/" in Opera connected to an IMAPdir depot resulted in the >following error message: 'NO CREATE failed: No such mailbox >".bincimap-subscribed"' /me hides ;-) That's a pretty bad error message - I'm looking into it now. >2. Creating "/" in Opera connected to a Maildir++ depot resulted in the >following error message: 'NO CREATE failed: unable to create ./cur: File >exists' (in response to a 'CREATE INBOX//' I guess you used INBOX as the namespace? Anyway - what happened was that INBOX could not be created, because the ./cur directory already existed. Maybe a not-so-useful error message, but it's exactly what went wrong. :-) >3. Opera seems to ignore the create errors (on "/") and does a subscribe >anyway, which results in "/" being an alias for "INBOX". Then, moving a >message from "INBOX" to "/", causes the message count in "/" to always >increment by 1, but only occasionally increment by 1 in "INBOX"!-) That's a bug in Opera - it should of course not subscribe to / if CREATE failed. Copying messages from and to the same mailbox should actually work pretty fine - so this may be a Binc error. >4. I can create "..." and "...." maildir's on Unix and be subscribed to >them in opera (and in .bincimap-subscribed), but get the following error >message 'NO STATUS failed: Unrecognized mailbox: "//"' in response to a >'STATUS // (MESSAGES UIDNEXT RECENT)' Yes, two hierarchy delimiters next to eachother doesn't make any sense. Could you create these mailboxes within Binc IMAP? Could you subscribe to them from within Binc IMAP, or did you have to create the entries manually? >5. I can create "..." and "...." maildir's on Unix and add them to >.bincimap-subscribed; they show up as blanks in Squirrelmail. When I try >to rename "///", I get the following error message 'ERROR : Could not >complete request. Query: UNSUBSCRIBE "//" Reason Given: UNSUBSCRIBE >failed: Not subscribed to "//"', but I can create a subfolder. 1) I guess Squirrelmail strips hierarchy delimiters. 2) Entries in the subscription file may not be valid mailboxes - I guess Binc could filter out entries that do not conform to the current depot's mailbox naming conventions. >I think that we would all like to see subscribed mailboxes in >.bincimapsubscribed match as closely as possible to a directory in >IMAPdir: this minimizes entropy. I still think that there are >improvements that could be made. I have a couple of (minor) ideas, but >would like the weekend to review the IMAP documentation and to ponder them >more (to ensure that they really are improvements). Please do share them when you come up with something. :-) >> this sense. If I subscribe to "thisfolderdoesnotexist" when it doesn't >> exist, then it doesn't make sense for Binc to display it in LIST, which >> lists the depository's actual contents. >But they are not unrelated. If I subscribe to "folder" after having >already subscribed to "/folder" I expect them to be different. Quirkiness >results when moving mail from "folder" to "/folder" in Opera (as mentioned >above). If you subscribe to the same mailbox with two names, which can also be achieved by symlinking mailboxes, then they should act as two seperate mailboxes. Copying, appending and so on _should_ work fine. >> The slash character is neither allowed in IMAPdir or Maildir++. If Binc >> allows "//" in the folder path then this is a bug in Binc. >I was refering to the folder path the client sees: Binc does allow ".." >in the directory names (e.g. 'folder..subfolder'). That's a bug in the IMAPdir spec - it should not allow that. :-) >> Andy - curious to what caused the "/folder" item to appear in the >> subscribed file. :-) >Opera will create and subscribe to '/folder' when asked to do so. I understand - so it's a user who types in "/folder" in Opera. Binc will create "folder" and if Opera subscribes to "/folder" then Binc will display it as "/folder" in the subscription view. If the user subscribes to this folder twice, then Binc should behave correctly and consistently, regardless of how confused the user might get. One might wonder why the user subscribed to both "/folder" and "folder".. Andy :-) -- Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg Author of Binc IMAP | "It is better not to do something http://www.bincimap.org/ | than to do it poorly."

