Searching multipart emails and using squatter

Zachariah Mully zmully-kolab at
Fri May 13 16:17:15 EDT 2005

Hello all-
	I'm working on optimizing the Kolab Groupware ( webclient
( and I've run into a couple of problems with the format
they've chosen for their data. Kolab uses Cyrus-IMAP as its main
storage, all calendar, note, and addressbook XML objects are stored as
multipart emails, with the actual XML in a part with mime-type
"application/x-vnd.kolab.XYZ" (where XYZ is the Kolab object type, i.e
event, note, address).
	Due to XML object mime-type, SEARCH BODY requests don't work, as the
IMAP server has no idea what the heck it is, and therefore, the
webclient must fetch and retrieve the entire calendar mail store and
parse it to find relevant entries. This is, of course, miserably
inefficient and makes the webclient completely useless once the calendar
mail store has several hundred objects in it.
	My question is, is it possible to get Cyrus to recognize the Kolab XML
object and index it so that the webclient can use SEARCH BODY requests
to fetch relevant calendar entries? For the Cyrus gurus out there, is
this a reasonably efficient method of fetching the data, or should I be
looking at offloading these operations onto a database that mirrors the
data? I would like to avoid the additional complexity of maintaining a
separate cache of the data, but the developers of Kolab don't see a need
to expose the XML to the Cyrus' native caching and searching by changing
the mime-type to something like "text/xml" which Cyrus does understand.

Sample Kolab object:

From: zmully at
To: zmully at
Subject: 917326a972f16cab2a4eaa98c450d85d
User-Agent: horde/kolab/1.0
Date: Mon, 21 Mar 2005 13:49:07 -0500
X-Kolab-Type: application/x-vnd.kolab.event
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=_t8wxtxnnleo"
Content-Transfer-Encoding: 7bit

This message is in MIME format.

Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

This is a Kolab Groupware object. To view this object you will need an
client that understands the Kolab Groupware format. For a list of such
clients please visit

Content-Type: application/x-vnd.kolab.event
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<event version=3D"1.0">
  <summary>Denise Goodbye Lunch</summary>
    <smtp-address>zmully at</smtp-address>


Many thanks,

Cyrus Home Page:
Cyrus Wiki/FAQ:
List Archives/Info:

More information about the Info-cyrus mailing list