On Mon, 17 Mar 2003, Dan Mills wrote:
>So (on the imap side) dots are not allowed in mailbox names, unless 
>they happen to be at the beginning of the name?  I don't see the 
>usefulness of making that exception.
>i.e., what happens if you try to create a mailbox (over imap) called 
>"foo.bar"?  The possibilities I see are:
>a) The dots are encoded into something else to avoid having them 
>interpreted as directory separators later.
>b) The mailbox is created as-is, thus creating subfolders in the 
>process.
>c) An error is thrown.
>(a) is awful and bound to cause problems later, (b) is sort of ok, but 
>not really optimal since people should be using "/" as the separator on 
>the imap side, which leaves (c).  Unless there's some other option I'm 
>missing.

I see your point - there is a hole in the spec. The first thing that pops
into my mind is that in order for IMAPdir to support dots in the middle of
mailbox names, they could be "encoded" using two dots. So:

foo -> foo
foo.bar -> foo/bar
foo..bar -> foo.bar
foo...bar -> foo./bar

Leftmost derivative, to avoid ambiguity.

So this would be the exception: either one or two dots at the start of an 
item in IMAPdir represents one dot in the start of the mailbox name:

.foo -> .foo
..foo -> .foo

How does that sound?

>With that in mind, selecting ".foo" should do one of:
>a) Select "foo" at the top level.
>b) Select ".foo" if dots are allowed in names (ie, they get encoded 
>into something else).
>c) Throw an error.
>(c) is not wise, because compatibility with existing Maildir++ users is 
>desired.  (b) is correct iff dots are allowed in names, otherwise (a) 
>is the correct option.
>Does this make sense, or am I smoking more crack than usual? :)

I don't know what you're usually smoking but it seems to be working ;).

Andy

-- 
Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg
Author of Binc IMAP    | Nil desperandum

Reply via email to