home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!srvr1.engin.umich.edu!news-server.engin.umich.edu!disser
- From: disser@engin.umich.edu (David Disser)
- Newsgroups: comp.mail.mime
- Subject: Re: pgp headers for MIME
- Followup-To: comp.mail.mime
- Date: 22 Jan 93 12:21:47
- Organization: University of Michigan
- Lines: 65
- Distribution: world
- Message-ID: <DISSER.93Jan22122147@simile.engin.umich.edu>
- References: <C18C4r.6K8@wizzy.com> <KHERA.93Jan22095241@thneed.cs.duke.edu>
- NNTP-Posting-Host: simile.engin.umich.edu
- In-reply-to: khera@cs.duke.edu's message of 22 Jan 93 14:52:41 GMT
-
-
- I made some wrapper scripts around PGP a while back to handle this sort of
- thing. I *do* use 'text/x-pgp' and 'pgp -a' because it allows people with
- pgp but not MIME to still read the messages.
-
-
- Here's a start for mh + MIME users: an "editor" that runs out of the MH
- "What now?" prompt, and PGP encodes your message in a nice mhn-processable
- format. Note that this works only on MH 6.7.2-MIME+mtr or later.
-
- Call this script "pgpedit" and make links to it called: pgpe, pgpes, pgpk,
- pgka.
-
- After you're done writing your message, type "edit pgpe" at the What now?
- prompt, it will try to figure out who you're sending to, encode with their
- key if you have it, and format it for MHN. Then type "edit mhn" and voila
- your message is ready to go. The type is "text/x-pgp" and needs an
- .mh_profile line like:
-
- mhn-show-text/x-pgp: pgp -m %F
-
- You can call it by different names for different options, notable "pgpk" to
- send someone your public key, or "pgpka" to send the whole keyring.
- Anyway, here's the script.
-
- #!/bin/sh
-
- case `basename $0` in
- pgpes) opt="-feast" ;;
- pgps) opt="-staf +clearsig=on" ;;
- pgpe) opt="-feat" ;;
- pgpka) pgp -kxa "" pubkey$$
- (echo '#<text/x-pgp';cat pubkey$$.asc;echo '#') >> $*
- rm -f pubkey$$.asc
- exit 0 ;;
- pgpk) pgp -kxa $USER pubkey$$
- (echo '#<text/x-pgp';cat pubkey$$.asc;echo '#') >> $*
- rm -f pubkey$$.asc
- exit 0 ;;
- esac
-
- if head -20 $* | grep -s '^--------$' ; then
- sed -ne '1,/^--------$/p' $* > header$$
- sed -e '1,/^--------$/d' $* > body$$
- else
- sed -ne '1,/^$/p' $* > header$$
- sed -e '1,/^$/d' $* > body$$
- fi
-
- to=`sed -ne 's/^[tT]o: //p' header$$`
-
- if [ -n "$to" ] ; then
- if pgp -kv "$to" 2>&1 | grep -s '^pub' ; then
- echo Using public key for $to.
- opt="$opt $to"
- fi
- fi
-
- (cat header$$;echo '#<text/x-pgp';pgp $opt < body$$;echo '#') > $*
- rm -f header$$ body$$
- --
-
- ) Dave Disser UM-CAEN User Services
- ) disser@engin.umich.edu 229 Chrysler Center
- ) (313) 763-3067 Ann Arbor, MI 48109-2092
-