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

Shawn Walker swalker at bynari.net
Mon Jul 29 16:45:01 CEST 2013


Hi Jeroen,

Thanks, but that doesn't look like those can be trusted to be 100% if 
server is a Kolab 3 server, especially if the server was upgraded from 
Kolab 2 server.

I think it would be helpful if the server can send the "kolab-version" 
"3" or "3.0" in the IMAP ID command response.  The Kolab 3 server 
already supports the IMAP ID command.   Our client already send a ID 
request to the server that was done for a different server to initialize 
what language the server should us for the client.  You can ignore the 
client ID request but the client will look to see what server version.

. ID ("name" "Outlook Connector" "vendor" "Bynari, Inc." "version" 
"4.2.0-0603517" "lang" "en_US")
* ID ("name" "Cyrus IMAPD" "version" "v2.4.17-Debian-2.4.17-3 d1df8aff 
2012-12-01" "vendor" "Project Cyrus" "support-url" 
"http://cyrusimap.web.cmu.edu" "os" "Linux" "os-version" 
"3.2.0-4-686-pae" "environment" "Built w/Cyrus SASL 2.1.25; Running 
w/Cyrus SASL 2.1.25; Built w/Berkeley DB 5.1.29: (October 25, 2011); 
Running w/Berkeley DB 5.1.29: (October 25, 2011); Built w/OpenSSL 1.0.1c 
10 May 2012; Running w/OpenSSL 1.0.1e 11 Feb 2013; Built w/zlib 1.2.7; 
Running w/zlib 1.2.7; CMU Sieve 2.4; TCP Wrappers; NET-SNMP; mmap = 
shared; lock = fcntl; nonblock = fcntl; idle = idled")
. OK Completed

The reason being for our client not asking the user if they are using a 
Kolab 3 server is that a lot of users don't really know what server they 
are using, only the administrator will.  So, what we try to do is remove 
any 'guessing' that the user has to know and to cut down our support 
calls and having to figure out for the user what server they are using.

Regards,
Shawn

On 7/29/2013 9:19 AM, Jeroen van Meeuwen (Kolab Systems) wrote:
> 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
>



More information about the devel mailing list