Subject: pgp with pine: how to?

From: [email-masked] (Lee Kokot)
Date: 14 Apr 1996 19:27:01 -0700

Hello, I would like to use pgp with pine 3.92.  Is this possible,
what is the procedure.  Thank you.

--
Regards, Lee Kokot
Encino, CA                               [email-masked]

---

From: [email-masked] (Jie Yuan)
Date: 15 Apr 1996 16:08:07 GMT

>what is the procedure.  Thank you.

Assuming Unix Pine: you can use a sending-filter like this

	/usr/local/bin/pgp -feast

to have the message encrypted, or

	/usr/local/bin/pgp -fast

to clear-sign the message when you send emails.

You can almost do exactly the same thing for the "display-filter",
but you may miss the dialog with PGP when you decrypt emails.  A
perl script posted in this group helps.  I am using it on my Pine.
The interface is almost ideal, IMHO.  I have enclosed the script
at the end of this message.  I am not the author and I forgot the
author's name.

Jie 
-- Jie Yuan, PhD - U. Cincinnati - Pharmacology & C.B. --
== POBox 670575, Cin., OH 45267-0575  =  513-558-2352  ==
== [email-masked] = www.uc.edu/~yuanj =  using Knews  ==
== finger -l [email-masked] for my PGP pub. key=

#!/usr/local/bin/perl
#
# authenticate: Indicates a PGP signature is present, then tries to
#		verify its authenticity.  For use as a mail filter.
# Time-stamp: <96/04/03 12:52:14 rick>

# The following two strings suggest a PGP signature is present and
# delimit the signed message.  Individualize them, so that a forgery
# would be unlikely to employ them.  (For certainty, save the message
# and view it to see whether it is signed.)
$herald = "xxxxx\n\n";
$signoff = "xxxxx\n";

# Set the following string to the pathname by which to invoke PGP
$pgp = "/usr/local/bin/pgp";

# Okay, here we go!
################################################################

$| = 1;				# flush after the first print
print $herald;
$| = 0;

open(PGP, "| $pgp") || die "Can't open pipe: $!\n";
while (<>) {
    print PGP;
}
close(PGP);

print $signoff;

# Local variables:
# mode:perl
# End:

---

From: Daniel Cwiertniewicz <[email-masked]>
Date: Fri, 19 Apr 1996 15:39:18 -0400

-----BEGIN PGP SIGNED MESSAGE-----

> >>	/usr/local/bin/pgp -feast

I modified this a bit since there are times when I want to sign, and other
times when I want to encrypt.  First I created two filters that had two
different option settings (-feast and -fast).  However, it was impossible
to distinguish between the two since Pine only tells you the name of the
program it is going to run (pgp in this case) without showing the
parameters.  I then decided to create two links to pgp.  The first is
'pgpsign', the second is encrypt.  Now my filters look like this:

/opt/bin/pgpsign -fast
/opt/bin/encrypt -feast

The display filter is a simple matter of scanning for BEGIN PGP and then
invoke PGP as follows:

/opt/bin/pgp

Daniel Cwiertniewicz				Phone:	+1.313.577.0787
Academic Computing and Customer Services	Fax:	+1.313.577.8787
Computing and Information Technology		E-Mail:	[email-masked]
Wayne State University	              URL - http://www.pass.wayne.edu/~dan

---

From: [email-masked] (Jon Trulson)
Date: 19 Apr 1996 22:15:52 GMT

-----BEGIN PGP SIGNED MESSAGE-----

Jie Yuan ([email-masked]) wrote:
: In article <[email-masked]>,
: 	[email-masked] (Fishbowl) writes:
: >In article <[email-masked]>, Jie Yuan <[email-masked]> wrote:
: >>In article <[email-masked]>,
: >>	[email-masked] (Lee Kokot) writes:
: >>>Hello, I would like to use pgp with pine 3.92.  Is this possible,
: >>>what is the procedure.  Thank you.
: >>
: >>Assuming Unix Pine: you can use a sending-filter like this
: >>
: >>	/usr/local/bin/pgp -feast
: >>
: >>to have the message encrypted, or
: >>
: >
: >Is there a way for it to automagically get the recipient name?
: 
: No.  Pine does not feed the name to pgp.  I think it is possible if you 
: know how to implement some tricks using shell or perl language.

	Mmmmm no.  I use a command similiar to above, but with 
_RECIPIENTS_ passed as an arg... This makes pgp happy for encryption... 
Pine will replace _RECIPIENTS_ with the list of recip's your mail is 
detined for...

: 
: Jie
: -- Jie Yuan, PhD - U. Cincinnati - Pharmacology & C.B. --
: == POBox 670575, Cin., OH 45267-0575  =  513-558-2352  ==
: == [email-masked] = www.uc.edu/~yuanj =  using Knews  ==
: == finger -l [email-masked] for my PGP pub. key=
: 

- --
Jon Trulson		Inet: (work) [email-masked]
Systems Programmer II       : (home) [email-masked]
Information Technology, Metropolitan State College of Denver, Colorado
Patent Pending 		FREE MARS!

- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQENAzFqlGwAAAEH/1u4rzcOtlTHeTePo2o8O9szuLn6WG4tUqSEzPZ2SfjL+t3j
LIrtlGt4hnBEUfU/jmWNyQ75f8NBO2yi8VDcXjgnhfyRNE0duegdchnra9iS1Ukb
UCbvTWQOiPa0hslsvKXDg5XDrg6nxF3kOqam2qnDcHYPmDoV9Pr2QfNuYJefizCw
dswq/9O+LBvuQC7eKhi1BzGm4P2nys2wJPw1j+AH+6kkPLp6WFAN0pkWJkxUDkqK
G+r2xb3NIZjoxPGX+NxboOvHLTMj/k6itTiS0JwDAempOb2azXeqFL2EfmcbHI1T
jsZmow1uoPaDUOwQtcgBNVq0HDI6eraG913yRtkABRG0H0pvbiBUcnVsc29uIDx0
cnVsc29uakBtc2NkLmVkdT4=
=XjvH
- -----END PGP PUBLIC KEY BLOCK-----

---

From: [email-masked] (Fishbowl)
Date: Thu, 18 Apr 1996 15:56:07 GMT

>to have the message encrypted, or

Is there a way for it to automagically get the recipient name?

-james-

---

From: [email-masked] (Mark M.)
Date: 21 Apr 1996 04:24:06 GMT

-----BEGIN PGP SIGNED MESSAGE-----

Jie Yuan ([email-masked]) wrote:
> In article <[email-masked]>,
> 	[email-masked] (Fishbowl) writes:
> No.  Pine does not feed the name to pgp.  I think it is possible if you 
> know how to implement some tricks using shell or perl language.

Actually, if "_RECIPIENTS_" is included in the command line, the list of
recipients will replace it.  To automatically encrypt out-going messages,
just use a sending filter of "/usr/bin/pgp -feast _RECIPIENTS_".

- -- Mark

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[email-masked]              | finger -l for PGP key 0xf9b22ba5
http://www.voicenet.com/~markm/ | bd24d08e3cbb53472054fa56002258d5
"The concept of normalcy is just a conspiracy of the majority" -me

---

From: [email-masked] (William Unruh)
Date: 22 Apr 1996 00:53:01 GMT

>but you may miss the dialog with PGP when you decrypt emails.  A

Yes, you do miss that dialog and tht is not good at all.  You cannot see
its request for password, nor its messages if something goes wrong.
Is there any way to get Pine to display that stuff directly, rather than
when the filter exits?
--
Bill Unruh
[email-masked]

---

From: [email-masked] (Jie Yuan)
Date: 19 Apr 1996 15:12:26 GMT

Jie

---

From: [email-masked] (Jie Yuan)
Date: 22 Apr 1996 13:31:50 GMT

>Pine will replace _RECIPIENTS_ with the list of recip's your mail is 

Great!  I tried and it worked!  It is like this:

sending-filter = /usr/people/yuan/pgpstuff/pgpsign -fast _RECIPIENTS_
               = /usr/people/yuan/pgpstuff/encrypt -feast _RECIPIENTS_

where pgpsign and encrypt are symboloic links to /usr/local/bin/pgp.
These symbolic links are needed only because Pine shows only the name
of the application, not the options, when filters are selected.  It 
makes me wonder whether I am encrypting or signing the mail.  With
mnomenic names/links, I can know which action I am taking.

Jie

---

From: [email-masked] (Jie Yuan)
Date: 29 Apr 1996 20:07:32 GMT

In article <[email-masked]>,
	[email-masked] (Rupert Mazzucco) writes:
>It seems this things work well if the Content-Type is text/plain.
>How do we deal with application/X-PGP-message as set by e.g. elmpgp?
>Can I put the display-filter entry into the .mailcap file *as is*?
>I have some problems getting that to work.
>Also, shouldn't outgoing pgp-encoded mail have a proper Content-Type set?

I think you can use the rich header mode to add a proper content-type
line.  However, someone has to figure out a way to trigger Pine to
activate PGP when mails of such type is read.  I think it is doable,
but I don't know how to.  I wish Jon Trulson can help us out ... :-)

Regards,

Jie

---

From: [email-masked] (Rupert Mazzucco)
Date: 29 Apr 1996 13:55:36 GMT

Regards,
Rupert Mazzucco
-- 
Powered by Linux

finger [email-masked] for PGP public key