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.2010-02-10)

424.   Where do you get StrickPants?   [strick/2007-06-30]
398.   How can I fix dhclient in debian stable with the 2.6 kernel?   [leif/2003-12-20]
391.   Is E.B. White of Strunk and White fame the same one who wrote Charlotte's Web?   [overcode/2003-11-03]
332.   What is the best hostel to stay at while in Amsterdam?   [jake/2002-10-25]
322.   how do i verify an address in sendmail?   [jesse/2002-08-30]
314.   How can you talk to deaf people on the phone? (Thanks Mr. Jeff Young)   [jake/2002-05-11]
301.   Where can I find an interview with noted security researcher Gene Spafford?   [rupe/2002-01-09]
277.   What does K-Rad mean? is there a modern alternative to k-rad?   [mennonite/2001-10-08]
226.   How do you eat vegetarian in central Texas?   [combee/2005-04-08]
201.   Where are Mir, the Shuttle, and the ISS right now?   [rupe/2001-03-22]
146.   What commands do UNIX system administrators commonly use?   [rupe/2000-11-09] ( strick/2001-01-04 )
133.   How do I format an SGI filesystem?   [rupe/2000-10-09]
122.   What is the VAXorcist.?   [rupe/2000-09-25]
121.   What time is it?   [rupe/2000-09-18] ( josh/2001-04-03 strick/2001-03-10 )
113.   Why is my Python script returning a built in operation error?   [rupe/2000-07-21]
95.   What do the * and ** and *** mean by a FQA number?   [strick/2000-05-14]
94.   How do I boot my Sparc Classic/Sparc Classic X/Sparc 5/Sparc 10 without a keyboard or monitor?   [rupe/2000-05-12]
81.   How do I do port-forwarding with ssh?   [robey/2001-03-25]
78.   Where can I find the latest copy of nmap?   [rupe/2000-04-22]
43.   How much coffee/Mountain Dew can you drink before dying?   [robey/2002-12-06]
39.   Can we get a peek at CRPL?   [strick/2000-02-01]