by rupe

How can I integrate PGP5 functionality into the pine mail reader?

https://www.cypherpunks.to/pgp5-pine/ is a good place to start, and has a tool called pgp5-pine, which uses sh scripts as filters in order to accomplish encryption, decryption, verification and signing. From the README file:

				pgp5-pine	
			PGP5/Pine Integration Scripts
				version 0.1 
		   Jeremey Barrett 
=====================================================================

This is my first public release of this package. Included are three
sh scripts which act as filters for the Pine mail reader. The scripts
allow you to decrypt, verify signatures, encrypt, and sign using
PGP 5.0 for unix platforms, integrated with pine via its filters
feature. These scripts do NOT implement PGP/MIME, since pine does not
give the MIME structure of a message to its filters.

FILES:
   pgp5send
   pgp5decrypt
   pgp5verify
   README
   LICENSE
   sample.pinerc


INSTALLATION:
	To install the scripts, copy them to your favorite location for
such things, such as ~/bin or /usr/local/bin or whatever. Make sure
they are executable by you (i.e. chmod 755 them). 


CONFIGURATION:
	You need to configure pine to use these scripts as its filters.
There are 2 methods for doing this: the first is to use pine's 
configuration editor, the second is to edit your .pinerc directly. I
will go over using the configuration editor. If you plan to edit
.pinerc directly, refer to the sample.pinerc included in this release.

From Pine's main menu, choose S (for Setup), then C (for Config).
First, enable the compose-send-offers-first-filter option. Now
scroll down to the display-filters option, near the bottom. Set
display-filters to:

_BEGINNING("-----BEGIN PGP MESSAGE")_ PATH_TO_SCRIPTS/pgp5decrypt _TMPFILE_ 
_RESULTFILE_, _BEGINNING("-----BEGIN PGP SIGNED")_ PATH_TO_SCRIPTS/pgp5verify 
_TMPFILE_ _RESULTFILE_

Note: that MUST all be on one line; I have separated it onto three for
clarity's sake. Now set sending-filters to:

PATH_TO_SCRIPTS/pgp5send _TMPFILE_ _RESULTFILE_ _RECIPIENTS_

In both cases, replace PATH_TO_SCRIPTS with your path to the pgp5-pine
scripts. That's all you need to do. pgp5send contains one configuration,
the URL to a PGP5 keyserver, which you can change if need be. It is
set to "hkp://keys.pgp.com" by default. You will need to edit pgp5send to
change it.


NOTES/BUGS/etc:
	These scripts do NOT cache your passphrase. This is good and bad,
in the future I will probably come up with some scheme for cacheing it
for a period of time, and make it optional. 
	When you reply to a message, the display filters are invoked. 
This means that if you view an encrypted message, and enter your passphrase, 
and then choose to reply, you will have to reenter it. 
	Status messages are displayed by pine just above the menu at the 
bottom of the screen. If you view a signed message, for example, the filter 
will return a status to pine and it will be displayed, such as "Bad or 
Unverifiable Signature".
	Right now, pgp5decrypt does not tell you if a signature on an
encrypted message is valid or not (will do soon).
	Pine sends the message to be encrypted to pgp5send via a temp
file right now. This is a Bad Thing(tm). This will change in a future
release.
	pgp5-pine assumes that the pgp5 executables are in your path.
This can be bad, especially if you're paranoid. If you're worried 
or the executables are not in your path, edit the scripts and add 
full paths.


LICENSE:
	Refer to the LICENSE file included with this release for a
full copyright and license. Thanks to Raph Levien  for the
license, I borrowed it from premail.

 


 
Read more of   The Yak's Frequently Questioned Answers   (mod.2008-11-08)

442.   What is erlang (and why should I care?)   [aestetix/2008-06-01]
432.   Who are the Steve Police?   [jake/2006-05-21]
390.   Where can I learn more about the fascinating game of Go (aka Wei chi, Weiqi, Baduk, etc)   [leif/2003-10-20]
362.   How do I make Internet Explorer download more than 2 files at a time?   [matt/2003-06-17] ( strick/2003-06-21 )
352.   Where can I see an example of looping code in G and in C?   [jake/2003-02-26]
342.   Where is a good place to learn about secure programming (or how not to get laughed at)   [jake/2002-12-19]
332.   What is the best hostel to stay at while in Amsterdam?   [jake/2002-10-25]
330.   what is a terrible feeling to have when you are hung over?   [jake/2002-10-11]
301.   Where can I find an interview with noted security researcher Gene Spafford?   [rupe/2002-01-09]
273.   Where do I find a free comma delimited file with all USA zipcodes, including longitude and latitude?   [les/2001-09-06]
264.   What started in 1984?   [strick/2001-08-10] ( macki/2001-09-04 robey/2001-08-22 )
260.   What is the best language to search google with?   [kurt/2001-07-23]
213.   When and where is the next space launch?   [rupe/2001-04-17]
198.   What tiny laptop does strick travel with?   [strick/2001-03-13]
187.   So when's the BIG PARTY?   [strick/2002-01-23] ( nana/2001-03-22 nana/2001-03-21 macki/2001-03-04 )
179.   How can I become a hacker?   [strick/2001-06-21] ( rupe/2001-02-28 )
132.   What is the official scale for grading Yak parties?   [rupe/2000-10-08]
130.   How do I resolve the incompatibility of many older Mac applications with OS9?   [rupe/2000-10-08]
87.   How do i OPT OUT of doubleclick's user-tracking cookies?   [strick/2000-05-11]
57.   How do you make popcorn salad, and is it actually a "salad"?   [mockturtle/2000-02-12]
54.   What is the preferred word to use to refer to Windoze boxes?   [jamison/2000-02-11]
51.   I'm playing with dialpad.com -- What's the USGS earthquake info phone #?   [strick/2000-02-06]