Integrating Pine and PGP (on Unix)

Requirements:


Conventions:

Instructions for the content to be typed are between single quote, 'like this'. For example, you type only the letter 's' when I say type 's'. When I say type '_LEADING("-----BEGIN PGP") xxxx', you type everything starting with an undescore up to the 4 x.


Let's do it:
  1. Launch Pine.
  2. Go to the Setup Configuration menu (type 's' then 'c').
  3. Go down the menu a few pages and find display-filters.
  4. Type '?' and read the help message for this item.
  5. Type 'a' to enter a new value like this '_LEADING("-----BEGIN PGP")_ /local/bin/display.sh', which will activate PGP if a message contains a line that starts with (or has a leading character string of) -----BEGIN PGP. Either encrypted or clear-signed message will activate PGP. You will be prompted for passphrase. You will see all the PGP messages before it finishes the chore.
  6. Go to the item sending-filters and read its help message by typing '?'.
  7. Type 'a' to add a value like this: '/local/bin/pgp_sign -satf', which serves as your clear-sign filter. Because Pine displays only the application's name, not the parameter, using the original pgp can be confusing at times. The symbolic links pgp_sign make it obvious for what purpose PGP is used for in this and the next filter.
  8. Type 'a' to add another value like this: '~/.pgpstuff/pgp_crypt -esatf _RECIPIENTS_', which serves as your encryption filter. The public keys of the recipients of the email will be used by PGP to encrypt the outgoing mail (also see comment for the previous item).
  9. Type 'e' to exit the configuration menu, and 'y' to confirm the changes.
You've done it! Test it out by signing and encrypting some emails to yourself and display them!
The above procedure puts the sending filters in optional positions. That is, they are not used as the first choice when you send mail after composing. If you hit return to the prompt "sending message (unfiltered)?", none of the filters will be used and your email will be plain text.

If you would like to sign all the messages by default, you should make sure the pgp_sign is the first filter in your configuration menu, and turn on the option compose-send-offers-first-filter in the configuration menu. You can select encryption as the first choice likewise.

No matter how you configure PGP with Pine, you are allowed to choose a filter for each message. Just use "^P" or "^N" to scan through all the filters (the unfiltered is one of the choices).

Happy Pining!


One may want to include the sender's key in the encryption so that the carbon copy (in the send-mail folder) can be decrypted by the sender. There are a few ways to make this happen. One approach is to add a line in the (PGP's) config.txt file like this: "ENCRYPTTOSELF=on". If you do not have a config.txt file, the other method is to use "+ENCRYPTTOSELF=ON" in the pgp command line. I have tried the first method and it worked. Remember that the config.txt file must be in your "PGPPATH" (default is ~/.pgp). This tip comes from peter bohac of Seattle Pacific University.

If one uses a mail alias address, it may be necessary to add another line in the config.txt file to indicate the key ID: MyName = "xxxx xxxx".


I welcome you to visit my home page, or email me if you like.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzFiq7YAAAEEAPcTcNg+VsG7S7MYJvWVMaO8I21xBtWnxYdUW2zA3if2GWD8
Ec+TruwNXSaXjhdLjMKd7OGNG0T34AOVB4Y/aS7lyvIEErNgdAR15DU3BIK6IpE3
Ezi/NqEYhltOPPhPb6dhG7CEKtpKB8EZ9h70LJ8AFmwZYbmvL4pLoVGlQuM1AAUR
tBpKaWUgWXVhbiA8SmllLll1YW5AVUMuRURVPg==
=/gSW
-----END PGP PUBLIC KEY BLOCK-----
Last update: 1996 Oct 15.