TB Extension for kolab (sync contacts with mail folder)

Talk about add-ons and extension development.
Post Reply
User avatar
gargan
Posts: 23
Joined: February 16th, 2005, 2:31 pm
Location: Vienna, Austria
Contact:

TB Extension for kolab (sync contacts with mail folder)

Post by gargan »

Hi everyone. I wrote a small (actually it has more than a thousand lines :) ) extension for thunderbird that syncronizes the address book with a mailfolder (imap f.e.) so thunderbird acts as a real kolab client (like kMail or athaera). You can check it out at http://www.gargan.org/extensions/synckolab.html

While writing it I came to a pretty big problem that's still bugging me, because right now the extension is quite unstable:
There seems to be no "normal" way to read/write a tb message using script. It is easy enough to get the headers (altough I have a bug with tb under linux there). But from then to get f.e. the message content as String is a pain. I actually have to get the offline stream and parse the WHOLE folder for my msg (in my case that was exactly what I wanted, so I didnt care for the "normal" way to get each message).

I am also really unhappy with the way I handle the rewriting of messages. Currently I create a temp folder, find out the message filename, delete the temp folder, create the known message file as filestream, write the messages, close the stream, create the temp folder - this is the ONLY way I found for creating any message on the fly. In my opinion, that sucks big time.

And because of the "weird" message writing way I now have to script the interface in order to the messages back where they orignally where (in the imap folder). If anyone wants to have a look how i did it, just unzip the xpi and jar, I think its pretty well documented.

Does anyone have any idea how to open a message (where I know f.e. the header from) in a read/write mode??? This would make the whole thing much more stable and quite a lot quicker since I do not have to do everything 3 times..

While I am at it - the mozilla address book should REALLY have a vcard ID field to store the vcard string. In my implementation I used the custom4 field to store the vcard id. This way I always know which card to update on my machines, and I dont have duplicate address cards...
DirtyDan04
Posts: 29
Joined: October 16th, 2004, 12:41 pm

Post by DirtyDan04 »

Hi, I am using a Mac and would really like to have this functionality to communicate among my many machines: WinXP, Linux, and Mac. I have not yet tried it on the PC side of things yet; however, it seems to hang in the "initialising..." phase. This particular attempt has been trying for 10 minutes. I think if it was not hung it would have finished by now.

I would be willing to help you test it for a Mac.
Everything counts, and so be kind.
-- Ramayana
Post Reply