| Next revision |
— | linux:pine_gpg [2006/03/17 12:43] – created alien |
---|
| It is not hard to make [[http://www.washington.edu/pine/|Pine]] read and send GPG-encrypted or -signed messages. Several tools are available that glue gpg and pine together, and I use [[http://quantumlab.net/pine_privacy_guard/|Pine Privacy Guard]] (PPG). This is a small Perl script that does all the hard work. |
| |
| * Install //Pine Privacy Guard// on your computer: <code> |
| wget http://quantumlab.net/pine_privacy_guard/pinepg-1.02.tgz |
| tar -C /usr/local -zxvf pinepg-1.02.tgz |
| cd /usr/local/ |
| chown -R root:root /usr/local/pinepg-1.02 |
| ln -s pinepg-1.02 pinepg |
| chmod 755 /usr/local/pinepg/pine_privacy_guard.pl |
| </code> If you install PPG in another place than ''/usr/local/pinepg'', make certain that you adapt the pathnames that are used further down in the Pine configuration. |
| |
| * Uncomment the line ''default-recipient-self'' in your ''~/.gnupg/gpg.conf'' file to encrypt to self so you can are able read your own encrypted //sent// messages later on:<code> |
| #default-key 0xYourKeyID |
| default-recipient-self |
| </code> |
| |
| * Configure Pine's display-filters and sending-filters\\ either edit your ''~/.pinerc'' directly and make sure that the relevant bits look like this: <code> |
| # This variable takes a list of programs that message text is piped into |
| # after MIME decoding, prior to display. |
| display-filters=_LEADING("-----BEGIN PGP MESSAGE-----")_ /usr/local/pinepg/decrypt _RESULTFILE_ _DATAFILE_ _PREPENDKEY_, |
| _LEADING("-----BEGIN PGP SIGNED MESSAGE-----")_ /usr/local/pinepg/verify _TMPFILE_ _RESULTFILE_ |
| |
| # This defines a program that message text is piped into before MIME |
| # encoding, prior to sending |
| sending-filters=/usr/local/pinepg/clearsign _RESULTFILE_ _DATAFILE_ _PREPENDKEY_, |
| /usr/local/pinepg/encrypt _RECIPIENTS_ _RESULTFILE_ _DATAFILE_ _PREPENDKEY_ |
| </code> or configure this from within Pine: (**S**etup > **C**onfig > **W**hereis > ''display-filters'' and add the two values shown above. Same for ''sending-filters'') |
| |
| * (Optionally - looks cool) add these custom X-Headers to each email you send with pine: <code> |
| # Add these customized headers (and possible default values) when composing |
| customized-hdrs=X-GPG-PUBLIC_KEY: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xA7 |
| 5CBDA0, |
| X-GPG-FINGRPRINT: F2CE 1B92 EE1F 2C0C E97E 581E 5E56 AAAF A75C BDA0 |
| </code> You can edit ''~/.pinerc'' directly (look for the ''customized-hdrs='' line) or configure from within pine (**S**etup > **C**onfig > **W**hereis > ''customized-hdrs'')\\ Of course, the example GPG fingerprint and key-URL are mine, and you should substitute your own. |
| |