[Imap-protocol] NAMESPACE and LIST

Mark Crispin mrc+imap at panda.com
Sun May 30 16:44:10 PDT 2010


On Sun, 30 May 2010, Dan Karp wrote:

> Apologies, but could you elaborate on the difference between

>>> * NAMESPACE (("" "/")) (("/home/" "/")) NIL

>>> * LIST (\NoSelect) "/" ""

> and

>> * NAMESPACE (("" "/")) (("~" "/")) NIL

>> * LIST (\NoSelect \HasChildren) "/" ~user4/

>>

>> * NAMESPACE (("" "/")) (("#user." "/")) NIL

>> * LIST (\NoSelect \HasChildren) "/" #user.user4


The whole point is that "/home/" is a child of "/", whereas "~" and
"#user." are not.


> (Also, is the trailing "/" necessary in the latter two cases?)


Sorry for the confusion.

The trailing "/" is necessary.

Also, for the
* NAMESPACE (("" "/")) (("/home/" "/")) NIL
case the correct response to
tag LIST /home/joe ""
is
* LIST (\NoSelect) "/" "/"
with or without \HasChildren

The
* LIST (\NoSelect) "/" ""
response (with or without \HasChildren) is for the default namespace.


Thus, the corrected examples:

1 namespace
* NAMESPACE (("" "/")) (("/home/" "/")) NIL
1 OK NAMESPACE complete
2 LIST /home/user4/box "" (or 2 LIST /home/user4/ "")
* LIST (\NoSelect) "/" ""
2 OK LIST complete

1 namespace
* NAMESPACE (("" "/")) (("~" "/")) NIL
1 OK NAMESPACE complete
2 LIST ~user4/box "" (or 2 LIST ~user4/ "")
* LIST (\NoSelect \HasChildren) "/" ~user4/
2 OK LIST complete

1 namespace
* NAMESPACE (("" "/")) (("#user." "/")) NIL
1 OK NAMESPACE complete
2 LIST #user.user4/box "" (or 2 LIST #user.user4/ "")
* LIST (\NoSelect \HasChildren) "/" #user.user4/
2 OK LIST complete


Note that in the above examples
2 LIST /home/user4 ""
2 LIST ~user4 ""
2 LIST #user.user4 ""
refer to the superior of each of these names due to the missing trailing
"/". This is probably not what you want and is probably undefined.

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