[Kolab-devel] How to properly detect a Kolab 3 server?

Jeroen van Meeuwen (Kolab Systems) vanmeeuwen at kolabsys.com
Mon Jul 29 16:19:55 CEST 2013


On 2013-07-29 14:59, Shawn Walker wrote:
> Is there a "proper" way to detect a Kolab 3 server to put the client
> in the correct mode?
> 

Hi Shawn,

There's a variety of things that would allow a client to "detect" a 
Kolab 3 server vs. a Kolab 2 server, but all of them have to do with the 
format definition and payload.

Since most clients tend to allow the user to specify what version of a 
Kolab server (should read: what format version the payload is in on the 
Kolab server) they want to configure their client for, no really well 
defined process for automatic detection has been specified, I'm afraid.

That said, a client could detect the version of the format to be used as 
follows:

     1) list annotations for all mailboxes (shared and private),

     2) select one (or iterate over) groupware folder(s), until contents 
are found,

     3) examine the RFC822 headers of this content (one message might 
suffice, but multiple messages could be used for assurance);

       3a) If an X-Kolab-MIME header exists, it holds the Kolab format 
version number (int '3' or double/float '3.0', it should be compared as 
a version number, not a literal string),

       3b) If no X-Kolab-MIME header exists, it is Kolab format version 
2.

     4) Should no folder with any contents exist, we have to revert back 
to detecting the way annotations had been used in Kolab 2, and how they 
are defined for Kolab 3:

         - in Kolab v3, no /shared/vendor/kolab/folder-type (or 
/vendor/kolab/folder-type value.shared) annotation may hold a .default 
suffix [1],

         - in Kolab v2, no /private/vendor/kolab/folder-type (or 
/vendor/kolab/folder-type value.priv) annotation was used.

The IMAP server shipped with Kolab 3 software repositories may still 
hold Kolab format version 2 payload - if other clients (web client, 
activesync, etc.) are explicitly configured to do so, Kolab format 
version 2 will continue to work (best it would).

Similarly, a Kolab server that was upgraded may still hold the old 
annotation semantics (basically using the shared annotation namespace 
mostly), so 4) should really, really only be used as a "fallback" and is 
considered an "educated guess" at best. I reckon most of the time, a 
server that has been upgraded this way will 1) for existing users, 
contain payload for steps 1, 2 and 3 to complete, and 2) for new users, 
will have their annotations for default folders created by the kolab 
daemon set up according to the spec for version 3.

Kind regards,

Jeroen van Meeuwen

[1] https://wiki.kolab.org/Kolab_3.0_Storage_Format#Annotations

-- 
Systems Architect, Kolab Systems AG

e: vanmeeuwen at kolabsys.com
m: +44 74 2516 3817
w: http://www.kolabsys.com

pgp: 9342 BF08


More information about the devel mailing list