MBOX-Line: From mrc+imap at panda.com  Sun May 30 16:44:10 2010
To: imap-protocol@u.washington.edu
From: Mark Crispin <mrc+imap@panda.com>
Date: Fri Jun  8 12:34:43 2018
Subject: [Imap-protocol] NAMESPACE and LIST
In-Reply-To: <1256742111.31.1275248463822.JavaMail.root@dogfood.zimbra.com>
References: <1256742111.31.1275248463822.JavaMail.root@dogfood.zimbra.com>
Message-ID: <alpine.OSX.2.00.1005301628570.77397@hsinghsing.panda.com>

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.

