Using roundcube for mailto: links

It’s quite annoying when you click somebody’s name or email on a web page and that Firefox cannot figure out how to rely on your system preferences to send an email.

For instance, my system is set up so that when I click on an email address or mailto: link anywhere, gnome-terminal opens up with Mutt ready to send an email. For some reason, Firefox tries to figure out all by itself which program I should use.

I have tried to make Firefox use gnome-terminal with Mutt, but it didn’t work. However, it’s possible to add your own webmail there (for some reason, I could choose between Yahoo Mail, Gmail and but I can’t remember how I did that). Now that I have my own Kolab instance with roundcube, I decided to add my own webmail there. Unfortunately, it seems there’s no way from the graphical interface, so I went straight to: ~/.mozilla/firefox/iceweaselprofile.hugo/mimeTypes.rdf.

It’s quite a big file FWIW (885 lines here). I did not have a look at the details, but hopefully just adding this helps (for the second block, make sure to merge with existing mailto handlers):

<RDF:Description RDF:about="urn:handler:web:;_action=compose&amp;_to=%s"
       NC:prettyName="Kolab Groupware"
       NC:uriTemplate=";_action=compose&amp;_to=%s" />

<RDF:Description RDF:about="urn:scheme:handler:mailto"

(Just replace with your own Roundcube location. And of course, if you don’t use Kolab replace “Kolab Groupware” by whatever.)