Sunday, May 17, 2009


Lately, I had to deal with digital maps at work - a very interesting topic. As I wanted to check out libchamplain anyways, I did a little plugin to display an estimate of the sender's location on a map in Claws Mail. This is a screenshot of one of my mails from a conference which I attended last year:

Of course, there's no way to infer the geographic location of a sender from the mail with any kind of certainty. For example, as mailing list management software tends to rewrite the mail headers, mails to the Claws Mail Users mailing list show up as originated here:

Other mailing lists (like GTK+, or Cairo) work fine, though.

The surprising (and somehow scary) result is that it works on a surprisingly large number of mails (in my quick test, almost half of the time), and if it does, it's oftentimes quite accurate, with deviations sometimes as small as 2 or 3 kilometers. I honestly wouldn't have expected that. The plugin is currently hosted on github, and requires Claws Mail from CVS and libchamplain 0.3.

On a side note: Also on github is an early version of a Gnome plugin, which includes the Gnome address book in Claws Mail's completion list. That plugin crashes on unload, though, which also happens during Claws Mail shutdown. I haven't investigated that in detail yet, but I wouldn't be surprised if that was due to a dependancy library not being plugin safe. Wouldn't be the first time.


  1. I have been configuring claws mail on OSX for a couple of days and thought I'd give the geolocation plugin a try.

    I'm happy to say it works! With some minor modifications ( using champlain 0.5 instead of 0.3) I got it to work pretty much from the get go.

    Very nice. Works indeed in many cases. I guess ip based geolocation can go a long way after all...

  2. Thanks for this intersting plugin for Claws :)

    I do have problem with it: I can't get it to display the beautiful maps shown on this article. The plugin display latitude and longitude right to button, but no image.

    I've tried with html display either with "fancy" or with "GtkHtlk2", same result. I've tried autodisplaying images: nothing more.

    I'm using libchamplain-0.4-0 and libchamplain-gtk-0.4-0 (debian squeeze). Claws version is 3.7.6. Geolocation's version is 0.0.3.

    I've probably missed something obvious, but I can't see what... Do you have any idea?