Andreas Aardal Hanssen wrote:

<snip>

If foo is an mbox, foo/bar is a maildir and foo/bar/foo is an mbox, how
would you represent this structure with your suggested scheme?

I'm fairly new to this conversation and I'm confused by this example. How can foo be both an mbox and a maildir, or is this the crux of the problem? If I understand it correctly, you want to represent hierarchy via two differing mechanisms; one for mbox (flat) and one for maildir (hierarchical). The problem then is how to resolve the namespace mapping into a single namespace.


There are only four solutions to this kind of problem:
1) Map the mbox hierarchy to the maildir one
2) visa versa
3) Map both to a third representation.
4) Leave them as distinct namespaces.

As I see it, you can use different rules for flat verses hierarchical filenames. For example, you can use the '.' as a hierarchical delimiter for non-directories but it would be a normal character for directories. The work will be on the IMAPdir service to map requests to both search spaces. Maildir format will not be affected, but it makes '.' illegal for mbox format, except as a hierarchical delimiter.

The real problem occurs when a root mbox and maidir have the same name. I think the proposal is to allow a '.' to prefix one of the names and be hidden by the service. This is starting to sound pretty kludgy.

Perhaps another approach is viable. Map mbox into the Maildir address space in a differ manner. Currently, Maildir has three directories; new, tmp, cur. Perhaps we can add a fourth element, mbox, that a link to an equivalently named mbox file. Then you are free to do duplicate namespaces as long as the mbox files are outside of the Maildir hierarchy. On systems without links, the mbox file can contain the real name of the mbox and be used as an indirect reference.

Using your example above:

mbox 'foo' is linked by foo/mbox
maildir 'foo/bar' is in foo/bar/{tmp,new,cur}
mbox 'foo/bar/foo' is linked by foo/bar/mbox

Am I way off base or am I making some sense?

Gary




Reply via email to