[Imap-protocol] Namespace separators

Mark Crispin mrc at CAC.Washington.EDU
Mon Jun 25 08:29:59 PDT 2007


Simple answer: this is why we have the # convention for alternative
namespaces, especially those which change the hierarchy delimiter.

What you have here is an ambiguity brought about by not using the #
convention and listing a namespace at the root. Both of these are bad
things to do, and will undoubtably confuse clients.

Mixing hierarchy delimiters is definitely a no-no. There is one, and only
one, hierarchy delimiter in a name. Thus, your second untagged response
to command 2 is bad, since it lies and says that the delimiter for news is
"/", and then commands 3 and 4 compound the issue.

You might have been able to get away with 3 and 4 had you not responded as
you did in command 2. In that case, "news/comp" and "news/alt" would
actually be top-level names, with "/" being an ordinary character.
Command 2 would not list "news" since there is no such name; and in any
case it shouldn't list news since that's a separate namespace.

Let me emphasize this: only ONE namespace is listed in a LIST command
command. Namespaces are NOT the same as root level names. By defining a
separate namespace you declare those names to be OUTSIDE of the space
listed in other namespaces!!!

In any case, I think that you should use the # convention, and keep your
delimiters separate; and not come up with oddballs and hope that they
work.

Here is the scenario that I think you should use:

1 namespace
* NAMESPACE (("" "/")) NIL (("#news." "."))
1 OK done
2 list "" %
* LIST (\HasNoChildren) "/" "INBOX"
2 OK done
3 LIST #news. %
* LIST (\NoSelect) "." "#news.comp"
* LIST (\NoSelect) "." "#news.alt"
3 OK done
4 list "" #news.comp.%
* LIST (\NoSelect) "." "news/comp.mail"
4 OK done


On Mon, 25 Jun 2007, Timo Sirainen wrote:

> Hand written, hopefully didn't leave errors:

>

> 1 namespace

> * NAMESPACE (("" "/")) NIL (("news/" "."))

> 1 OK

> 2 list "" %

> * LIST (\HasNoChildren) "/" "INBOX"

> * LIST (\HasChildren) "/" "news"

> 2 OK

> 3 list "" news/%

> * LIST () "." "news/comp"

> * LIST () "." "news/alt"

> 3 OK

> 4 list "" news/comp.%

> * LIST () "." "news/comp.mail"

> 4 OK

>

> Is it valid for news/ to change the separator?

>

> I guess many clients don't like it, but should I allow such

> configuration anyway?


-- 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.



More information about the Imap-protocol mailing list