mailing list archives

meli community discussions

⚠️ if something does not work as intended when interracting with the mailing lists,
reach out Github mirror Gitea repo @epilys:matrix.org

E-mail headers
From: Dan Karp <dkarp@zimbra.com>
To: imap-protocol@u.washington.edu
Date: Fri, 08 Jun 2018 12:34:43 -0000
Message-ID: 2082015573.1325.1275171163091.JavaMail.root@dogfood.zimbra.com permalink / raw / eml / mbox
If NAMESPACE returns

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

and the client issues

    A001 LIST "/home/user4/INBOX" ""

then should the untagged LIST reply be

    * LIST (\NoSelect) "/" ""

or

    * LIST (\NoSelect) "/" "/home/user4"

or

    * LIST (\NoSelect) "/" "/home/user4/"

?
Reply
E-mail headers
From: mrc+imap@panda.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:43 -0000
Message-ID: alpine.OSX.2.00.1005291527050.77397@hsinghsing.panda.com permalink / raw / eml / mbox
On Sat, 29 May 2010, Dan Karp wrote:
> If NAMESPACE returns
>    * NAMESPACE (("" "/")) (("/home/" "/")) NIL
> and the client issues
>    A001 LIST "/home/user4/INBOX" ""
> then should the untagged LIST reply be
>    * LIST (\NoSelect) "/" ""

Yes.

What you have in this example is a typical UNIX filesystem type export in
which other users are in the default namespace with "/home/" as the prefix
instead of the more common "~".  Since /home/ is in the default namespace,
the pattern matches it first.

This ambiguity is why you should do other-user access though "~":

 	0 namespace
 	* NAMESPACE (("" "/")) (("~" "/")) NIL
 	0 OK NAMESPACE completed
 	1 list ~user4/test ""
 	* LIST (\NoSelect \HasChildren) "/" ~user4/
 	1 OK LIST completed

or preferably (especially if you don't have to export a UNIX filesystem
hierarchy!) a separate namespace since otherwise you have to consider "~"
to be like a namespace:

 	0 namespace
 	* NAMESPACE (("" "/")) (("#user." "/")) NIL
 	0 OK NAMESPACE completed
 	1 list #user.user4/test ""
 	* LIST (\NoSelect \HasChildren) "/" #user.user4
 	1 OK LIST completed

Another design issue that you have to deal with is that certain clients
(e.g., from a convicted monopolist) can't access mailboxes in anything
other than the default namespace; and other clients will attempt to
download the complete contents of anything they find in the default
namespace.  This creates a Scylla and Charybdis problem that leads to lots
of hair pulling.  You have to consider the semantics of the default
namespace quite carefully.

For example, in my new server, the default namespace is a chimera of names
from:
  [1] user's private mailboxes (#mail/ namespace)
  [2] user's quarantine (#qt/ namespace)
  [3] a "Public Folders" (sigh on "folders", I lost that battle) pseudo
      directory that points to the user's published mailboxes in the
      #public namespace.
  [4] (future) public names published to all users, mechanism to be
      determined.

The user must have a namespace capable client to access #public mailboxes
that were not published to his default namespace, as well as other user's
private mailboxes (#user/ namespace) and (if the user is privileged) the
global quarantine.

The interesting thing here is that the default namespace is a superset of
the user's private space.  This chimera made things much easier, since it
avoided arguing about what is in the user's private space.  Also, since
the chimera is implemented by software instead of the storage layout, it's
possible to make substantial updates (and even have adminstrator
configuration) without impacting the storage.  A big benefit; since in my
experience admins make decisions without fully understanding the impact,
and the ability to change things gently is quite useful.

-- 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.
Reply
E-mail headers
From: dkarp@zimbra.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:43 -0000
Message-ID: 1256742111.31.1275248463822.JavaMail.root@dogfood.zimbra.com permalink / raw / eml / mbox
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

(Also, is the trailing "/" necessary in the latter two cases?)
Reply
E-mail headers
From: mrc+imap@panda.com
To: imap-protocol@localhost
Date: Fri, 08 Jun 2018 12:34:43 -0000
Message-ID: alpine.OSX.2.00.1005301628570.77397@hsinghsing.panda.com permalink / raw / eml / mbox
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.
Reply