Table of Contents

Email encryption with Pine and GPG

Pine is a nice but powerful console mail client, and just like GPG, it is available on many Linux and Unix based computers. It is not hard to make Pine read and send GPG-encrypted or -signed messages. Several tools are available that glue gpg and pine together, and I use Pine Privacy Guard (PPG). This is a small Perl script that does all the hard interfacing work.

Installation and configuration

Working with GPG in Pine

Sending email

You use Pine as usual, so composing a new email is no different than before. The fun starts when you press <CTRL>-X to send it. Upon pressing <CTRL>-X instead of sending the message, Pine will ask which filter you want to use. You can choose 1 of 3 options (and cycle through them using <CTRL>-P and <CTRL>-N):

  1. Unfiltered; send email without using any cryptography.
  2. Encrypt the email (PinePG will also sign it by default).
  3. Clear-sign the email.

After entering your choice, the email is sent.

During your Pine session, the first time you have to use GPG to read or send a mail message, you will be prompted for your GPG passphrase. After that PinePG will securely remember your passphrase for the remainder of that session, so that you won't have to enter it again.

Receiving email

If you open any email that contains a GPG signed or encrypted message, the pinepg filter is automatically invoked. You are prompted for your GPG passphrase, so that the message can be decrypted. The caracters that you type, will not be displayed on the screen.
The output of GnuPG is displayed. It will show whether or not the encrypted text was successfully decrypted, if the GPG signature is valid if it was signed, and any other relevant information:

gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: Signature made Fri Mar 17 03:19:07 2006 PST using DSA key ID A75CBDA0
gpg: Good signature from "Eric Hameleers <alien slackware.com>"
gpg:                 aka "Eric Hameleers <alien sox.homeip.net>"

Press E to continue.
The decrypted message is displayed as a normal message.

PGP/Mime

Pine Privacy Guard does not handle PGP/Mime encrypted emails. I found a couple of links with possible solutions, but have not yet looked too deeply into these.