Searching multipart emails and using squatter

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


Hello all-
	I'm working on optimizing the Kolab Groupware (kolab.org) webclient
(horde.org) 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 xyx.com
To: zmully at xyx.com
Subject: 917326a972f16cab2a4eaa98c450d85d
User-Agent: horde/kolab/1.0
Reply-To: 
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.

--=_t8wxtxnnleo
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
emai=
l
client that understands the Kolab Groupware format. For a list of such
emai=
l
clients please visit http://www.kolab.org/kolab2-clients.html

--=_t8wxtxnnleo
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">
  <uid>917326a972f16cab2a4eaa98c450d85d</uid>
  <creation-date>2005-03-21T18:49:07Z</creation-date>
  <sensitivity>public</sensitivity>
  <summary>Denise Goodbye Lunch</summary>
  <organizer>
    <smtp-address>zmully at smartbrief.com</smtp-address>
  </organizer>
  <start-date>2005-03-23T16:30:00Z</start-date>
  <end-date>2005-03-23T18:30:00Z</end-date>
  <show-time-as>busy</show-time-as>
  <last-modification-date>2005-03-23T15:32:29Z</last-modification-date>
  <product-id>horde/kolab/1.0</product-id>
</event>

--=_t8wxtxnnleo--


Many thanks,
Z

---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list