Tag Archives: GPG

Sign and encrypt mail with Thunderbird (enigmail)

Well, I had decided to give Thunderbird a go after I installed gutsy. I had never tried it actually, only to get my univ mails on a Windows box at work. This entry is to document an error I had, with the fix.

To create and manage gpg keys, please check here. So I’ll assume you already have a gpg key. Install enigmail, and restart your session (I think just restarting Tb will do).

sudo aptitude install enigmail

On Ubuntu, enigmail is in the main repositories:

isabella@yeti:~ $ apt-cache madison enigmail
  enigmail | 2:0.95.0-0ubuntu3 | http://archive.ubuntu.com gutsy/main Packages
  enigmail | 2:0.95.0-0ubuntu3 | http://archive.ubuntu.com gutsy/main Sources

When restarting Tb, a wizard will run, it’s all pretty straightforward. But I could not get to sign an email. Encryption would run fine, but then a similar error would come up, all related to the passphrase for my gpg key:

gpg can't connect to ~/.gnome2/seahorse-Mq1hUm/S.gpg-agent

Hmm… I did read tons of emails provided by a google search, forums posts and such. Then, I had a look at my ~/.gnupg/gpg.conf. Sure enough, commenting the lines:

# use-agent
# gpg-agent-info /home/isabella/.gnome2/seahorse-Mq1hUm/S.gpg-agent:4671:1

that you can find at the bottom of the file did the trick! All good now.

EDIT: Please read the comments below. Installing pinentry-gtk2 (Xfce desktop here) allows to comment only the last line (gpg-agent-info…) and use the agent.