OK, I went and read about Maildir++, and it seems we're stuck
with the damned dots.  OK, it's a stupid standard, but if we
have to support it I can live with that.  So now the question
becomes, how can we support the desired IMAP functionality
within that standard?  Here's my suggestion:

As the standard says, we can't do a normal directory tree; we
have to emulate it.  So, taking their suggestion of using ":",
the mapping of IMAP folders to directories can look like this
(assuming the top-level maildir is "."):

INBOX                   -->     .
Foo                     -->     ./.Foo
Bar                     -->     ./.Bar
Foo.Bar                 -->     ./.Foo:Bar
Foo.Bar.Baz             -->     ./.Foo:Bar:Baz
INBOX.Foo               -->     ./.:Foo
INBOX.Foo.Bar           -->     ./.:Foo:Bar

So, we get top-level folders and subfolders of them and of
INBOX, we're compliant with Maildir++, the IMAP path
separator can be whatever we we want, and we don't have any
migration issues.  The only thing we've potentially lost is
the ability to use ":" in folder names.  I can live with that.

Building the list becomes relatively simple: all folders are
in the same directory, so no recursive traversal is necessary.
Just load up the list, sort, and list.  As you list, if you
encounter ".Foo.Bar", and had not listed ".Foo" (which would
have sorted earlier if it were present), you know at that
point that you have to list "Foo (\NoSelect)".  Still no
recursion needed.

-- 
Lee Daniel Crocker <[EMAIL PROTECTED]> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC

Reply via email to