Using gpg with Pine
This article assumes you have already set up gnupg correctly, generated your own key and have imported your friend's keys into your keyring
If enough folks bug me about it, I will write something that explains all that too :)
gpg setup:
Move into your .gnupg directory
cd ~/.gnupg
Now create the following files:
checksig encrypt sign options
Now edit each file and put the following in each:
In file checksig
#!/bin/sh
/usr/local/bin/gpg && echo "[ PGP Signature ok - `date` ]" || echo "[ PGP Signature check FAILED - `date` ]"
In file encrypt
#!/bin/sh /usr/local/bin/gpg -aes
In file sign
#!/bin/sh /usr/local/bin/gpg --clearsign
Now make sure these scripts are executable
chmod 700 checksig encrypt sign
In file options
encrypt-to <me@here.com> #you gotta encrypt to yourself at least Pine setup:
Edit .pinerc and place the following in the places indicated. This can
also be done from within Pine by using the Setup/Configure menu.
# This variable takes a list of programs that message text is piped into # after MIME decoding, prior to display.
display-filters=_LEADING("-----BEGIN PGP SIGNED MESSAGE")_ /usr/home/username/.gnupg/checksig, _LEADING("-----BEGIN PGP MESSAGE")_ /usr/home/username/.gnupg/checksig
# This defines a program that message text is piped into before MIME # encoding, prior to sending sending-filters=~/.gnupg/sign, ~/.gnupg/encrypt Using it:
After composing a message and pressing CTRL-X, you will be prompted with a message asking if you wish to sign the message. If you select y you will
be prompted for your password and the message will be sent enclosed by your gpg signature. You can use CTRL-N at the "sign" prompt to move to the
next filter where you will be asked if you wish to encrypt the message. Pressing CTRL-N again will allow you to send the message without filtering.
Captain Kirk <Captain_Kirk@myrealbox.com>
|