InBoX listings

Bron Gondwana brong at fastmail.fm
Thu Oct 9 20:14:41 EDT 2014


So Cyrus currently does this:

. list "" "In*"
* LIST (\HasChildren) "." InBOX
* LIST (\HasChildren \Archive) "." InBOX.Archive
* LIST (\HasNoChildren) "." InBOX.Archive.2003
* LIST (\HasNoChildren) "." InBOX.Archive.2004
* LIST (\HasNoChildren) "." InBOX.Archive.2005
[...]

Which I used to think was because the standards required it, because why else would you do something so complex.  But I suspect this isn't actually the case.

This is the part of RFC3501 that is probably being implemented:

      Any part of the reference argument that is included in the
      interpreted form SHOULD prefix the interpreted form.  It SHOULD
      also be in the same form as the reference name argument.  This
      rule permits the client to determine if the returned mailbox name
      is in the context of the reference argument, or if something about
      the mailbox argument overrode the reference argument.  Without
      this rule, the client would have to have knowledge of the server's
      naming semantics including what characters are "breakouts" that
      override a naming context.

However, a little later we get this:

      The special name INBOX is included in the output from LIST, if
      INBOX is supported by this server for this user and if the
      uppercase string "INBOX" matches the interpreted reference and
      mailbox name arguments with wildcards as described above.  The
      criteria for omitting INBOX is whether SELECT INBOX will return
      failure; it is not relevant whether the user's real INBOX resides
      on this or some other server.

So I propose the following:

In non-alt namespace, we only ever output INBOX in all caps.

In alt namespace, we always output 'INBOX' for the Inbox folder.

Either way, we match any case query that could match inbox in any case,
so this works the same as Gmail:

. OK brongondwana at gmail.com authenticated (Success)
. list "" "i*"
* LIST (\HasNoChildren) "/" "INBOX"

Also, no existing behaviour is changed - here's my email in alt namespace right
now.


. list "" *
* LIST (\Noinferiors \HasNoChildren) "." INBOX
* LIST (\HasChildren \Archive) "." Archive
* LIST (\HasNoChildren) "." Archive.2003
[...]

But this crap goes away:

. list "" "i*"
* LIST (\Noinferiors) "." iNBOX
. OK Completed (0.010 secs 3 calls)

And that's that :)  Consistency.  This is one change to my email of many months ago,
in which I wanted to do the prettier "Inbox" in alt-namespace.

This will be landing in a tree near you shortly.

Bron.




-- 
  Bron Gondwana
  brong at fastmail.fm


More information about the Cyrus-devel mailing list