mozdev.org

synckolab

resources:
Important
  • To find the most recent updates visit gargan.org!

Sync Kolab

SyncKolab was written to add kolab functionality to thunderbird. It reads a selected Imap folder and synchronizes it with the local address book (and calendar in the future). It is currently under heavy development, so use with care!
It has been tested under Thunderbird for Windows, Linux and MacOSX.
For up-to-date information and most recent version, check out my regular homepage at www.gargan.org
Version 1.0 had 61 prereleases and 83 nightly releases with over 100 bugs fixed and is known to work nicely with Thunderbird 2 and Lightning 0.8.
Even with this extensive testing, there might still occur problems in combination with other extensions, operating systems, thunderbird versions and/or special characters in your contacts/tasks/calendar entries .
Because of this, you should make a backup of all your relevant data (server side or your profile directory) before doing your first sync. If seomthing happens because of a bug you can then easily restore your data afterward.

What is Kolab?

It loads all your contacts (from a selected address book), and synchronizes them with a selected imap folder. Where every contact is stored as an vcard. In the next version I also want to include calendar Entries (vCal)... For more information http://kolab.org/
The idea behind is, that you can now have your contacts+calendar entries stored on the imap server. so you can actually have the same addresses on more than one computer. The kolab project has a groupware server that uses imap to exchange calendar entries and vcards.

Server Requirements

No KOLAB server?

No. A Kolab server is not required.

So why call it syncKOLAB?

Basically because the idea of using imap as central storage comes from the kolab guys.

What does the kolab server do then?

1.) Its a full collaboration server with loads of additional feature you know from ie. exchange (like free/busy management, shared folders, invites....)
2.) the whole group, right etc. mangement
loads of other small thngs you would expect a kollaboration server to do :)

So do I need the kolab server?

If you want full collaboration in your company/group - YES... if you didnt need it until now and only want to sync your data over multiple maches - or just have a simple shared calendar/adress book with a few buddies - no. you can happily live with just your imap server :)

SyncKolab Nightly

You can get a nightly build at synckolab NIGHTLY (rightclick).

Beware that this may easily break all you contacts/calender entries, altough we try to create stable nighlies.
So create a backup of your thunderbird profile folder before trying it out!
* Added prefer-mail-format to contacts (XML Format)
* contact now displays displayname if no name/surname is given
* calendar now correctly writes/reads sync db file (speedup)
* calendar finally syncs correctly (bad error in database file)
* added seamonkey to the installable targets
* mail format changes recognized
* successfully tested calendar sync with thunderbird 3.0a1
* added seamonkey target application
* hu-HU translation added
* added possibility to use -1 as sync time to sync ALL entries
* fixed #1801: multiple attached cards/xmls are now handled correctly
* fixed Problems with newlines on parsers (two newlines made the parser cut off the xml)
* fixed a problem that sometimes prevented multipart messages from being parsed as xml correctly
* base64 errors fixed (if the =NUM was in the text it was accidently used as base64)
* added option to specify debug level (default:warning - set to DEBUG if you got a problem)

Status of the Kolab Extension

Synckolab is a stable beta successfully syncing contacts, calendar entries, tasks and not yet fully functional support for mailing list
It seems that there are still a few bugs in lightning concerning the database, but for most users it should work just fine.
To V 2.0.0

Want to help out?

Best thing you can do is get the most recent release, subscribe to the mailing list and ask what needs to be done (also take a look at the known bugs section). There is especially a lot of plain testing required. Since the extension is pretty new there are people needed who can test the extension on different Operating Systems, with some combinations of contacts (if all fields are transferred correctly) and so on...

You may aquire the current source code from the mozdev cvs, or get it directly from the xpi (simply unzip the latest xpi found on gargan.org you will find all source files in there (js).

How does synckolab work?

For those interested here is a short explenation (pretty technical) on how Sync Kolab actually works.
  1. get a list of all messages in the imap folder (only headers, which are cached locally. Thunderbird also makes sure that new messages are included)
  2. check each message header with a local database of the previous sync for a change. Message size, date and subject are used there (subject is the key value)
  3. if something changed or the message is new, download the message and strip everything except the message body (xml/ical/vcard). Save this part in the local sync database (=the file system)
  4. parse the message body into a adress book card/calendar event/task (lets call it CUR)
  5. get the id from CUR and check the local address book/calendar if there is an entry with the same id (lets call it ENTRY)
  6. if we did not find an ENTRY, save CUR in the adress book/calendar and continue
  7. if we found an ENTRY, make a comparison between CUR, ENTRY and LOCALDB (the entry stored in the local sync database (file system) from a previous sync)
    • if CUR=LOCALDB but ENTRY!=LOCALDB -> we know we changed something locally (ie. changed the name) so update ENTRY on the server (update=delete and readd), also update the LOCALDB on the filesystem
    • if CUR!=LOCALDB but ENTRY=LOCALDB -> we know the server entry changed, so we have to update ENTRY and LOCALDB
    • id CUR!=LOCALDB!=ENTRY -> we know we have a local change AND soemone changed the server entry -> ask what we should do
    • if CUR=LOCALDB but ENTRY is missing -> we know it has been deleted locally, so delete the entry on the server
  8. remember all entries already processed (so we dont check it twice)
  9. now go through all local entries (ENTRY) (except the one we already processed) and check:
    • if ENTRY is in LOCALDB: delete it (means it has been deleted from the server since the last sync)
    • if ENTRY is not in the LOCALDB: add it to the imap server
  10. finish up (liek make all new messages unread, and run compact to make sure its all on the server)
A few Remarks:

In the wild...

I started a few threads around the globe on different sites during development. If you are interested in some insight you can check them out.

My homepage can be found in www.gargan.org including a mirror of this + some other usefull things

This one is for those who have ideas on how I overcome some of my biggest problems: open a tb message in read/write mode
Antoher problem I ran into (which could have been avoided if the rewrite stuff had worked): Copying mail folder content from temp folder to imap I took some of the code from the TB Attachment Tools and TB Header tools for the writing of messages. You can get those pretty usefull extensions from Frank DiLecce (Ausdilecce).

For questions or comments about synckolab, please send a message to the synckolab mailing list.
Copyright © 2000-2008. All rights reserved. Terms of Use & Privacy Policy.