Add thunderbird support

Bug #594215 reported by Ian van Broesel on 2010-06-14
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Zeitgeist Data-Sources
Wishlist
Mark Tully

Bug Description

I would like to have support for send and/or received Emails for a specified account.

Related branches

description: updated

So we have to deal with XULRunner here?

Changed in zeitgeist-dataproviders:
importance: Undecided → Wishlist
barnimg (barnim-g) on 2011-07-20
Changed in zeitgeist-datasources:
assignee: nobody → barnimg (barnim-g)
assignee: barnimg (barnim-g) → nobody
Mark Tully (markjtully) wrote :

Attached is a first attempt at a Thunderbird add-on for Zeitgeist. It adds entries for new messages to Zeitgeist as follows:
  Event interpretation: EVENT_INTERPRETATION.RECEIVE_EVENT
  Event manifestation: EVENT_MANIFESTATION.SYSTEM_NOTIFICATION
  Actor: application://thunderbird.desktop
  Subject:
   Subject interpretation: MESSAGE.EMAIL
   Subject manifestation: MAILBOX_DATA_OBJECT
   url: Thunderbird's message uri
   mimetype: message/rfc822
   origin: mail sender's address
   title: message subject
   storage: net

The details of the event are also recorded in Thunderbird's error console, for debugging purposes.

There are a few issues with the extension as it stands:
  1: It adds more than one event to Zeitgeist (with different uris) if the message is in more than one folder. This is a particular problem in Gmail, where messages and easily be in several different folders.
  2: It does not yet distinguish between email messages and any of the other types of message that Thunderbird can handle (so newsgroup messages will also get added)
  3: Thunderbird doesn't seem to open a message if it's passed a message uri.

I tried out the extension. It works pretty well. No error shown at all in the Error Console.

> It adds more than one event to Zeitgeist (with different uris)
Can a check be made to the daemon before inserting a new event? Since it is all asynchronous, it should not be much of a problem (guess work)

> It does not yet distinguish between email messages and any of the other types of message
I think we can ignore this for now

> Thunderbird doesn't seem to open a message if it's passed a message uri
This needs to be taken care of

Changed in zeitgeist-datasources:
status: New → In Progress
assignee: nobody → Teester (markjtully)
milestone: none → 0.8.1
Artem (leipreachan) wrote :

I tried out the extension, too.
There is an issue with UTF8:
In my case I see many messages' topic as " =?UTF-8?B?0L/RgNC40LLQtdGC?=" (not the same, of course)

Mark Tully (markjtully) wrote :

I've linked a branch with the Thunderbird plugin in it to the bug. It resolves many of the issues that the initial version of the extension had. Events are now only added to Zeitgeist for email inboxes (so you don't get multiple instances of the same event being added to Zeitgeist anymore). The problem that tricote had with character encoding details appearing in the event should be resolved as well.

I've also changed the file that the extension links to, both for Thunderbird and Firefox, from libzeitgeist-1.0.so to libzeitgeist-1.0.so.1. The latter file is added to the user's system by libzeitgeist-1.0-1, while the former is only added by libzeitgeist-dev. So using the latter means the user does not have to have the dev package installed for the extension to work.

The extension has a logging option as well. In Thunderbird, go to Edit --> Preferences --> Advanced --> General --> Config Editor and search for extensions.zeitgeist.log. Double clicking this will change its value from false to true. Now event details will appear in Thunderbird's error console under Messages (Tools --> Error Console) as they are added to zeitgeist.

Oh wonderful. So can this be merged with the datasources? Is it well enough?

Artem (leipreachan) wrote :

No issues with encoding anymore, thanks.

Great. I have sent a mail to our dev mailing list and CCed you. That mail is for a code review.

Mark Tully (markjtully) wrote :

Ok. I got that email (it's at http://lists.zeitgeist-project.com/pipermail/dev/2011-October/000298.html by the way), and I've proposed the branch for merging. It could do with reviewing before merging. The extension part should be fine, but it probably needs more testing than on just my own machine. I just copied the build parts from the Firefox extension and changed the relevant file paths to ones suitable for Thunderbird, so hopefully it works correctly. Tricote's response suggests that it is, though.

Artem (leipreachan) wrote :

Looks like an issue:
<code>
(thunderbird-bin:16096): GLib-GObject-WARNING **: cannot register existing type `ZeitgeistEvent'
(thunderbird-bin:16096): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
(thunderbird-bin:16096): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
(thunderbird-bin:16096): GLib-GObject-WARNING **: cannot register existing type `ZeitgeistSubject'
(thunderbird-bin:16096): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
(thunderbird-bin:16096): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
</code>

This happens when you click a link in the message an thunderbird tries to open it in browser.
In my case this causes thunderfreeze :)

Ladies and Gentlemen - Cheer up.

Changed in zeitgeist-datasources:
status: In Progress → Fix Committed
Changed in zeitgeist-datasources:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers