Subject: PINESIGN 2.0: A simple script for PGP signing Pine mail

From: "Robert A. Hayden" <[email-masked]>
Date: Tue, 18 Jul 1995 12:48:49 -0500

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

After a couple of comments, I've updated Pinesign to a new version.  This 
new version adds the ability to choose whether your ascii signature (ie 
$HOME/.signature) is added.  Some mail servers get confused by extra 
text, so the ability to make sure nothing extra is added was requested.

Basically, if you want to sign the message both digitally and asciilly 
(is that a word :-), just press return twice after you exit your composing 
editor.  Otherwise, make the selections you want specific to the type of 
message you are sending.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

#!/bin/sh

# PINESIGN v2.0
# Written by:  Robert A. Hayden <[email-masked]>

# PINESIGN is a simple program that will allow you to automatically sign 
# your email and news messages composed with the Pine 3.89 mail reader.  It 
# may also work with other mail and news programs, but it has not been 
# tested.

# INSTRUCTIONS FOR CONFIGURING PINE
# 
# You need to define the following options in Pine.  This can be done 
# either via the SETUP options in the main menu of Pine, or via editing 
# the .pinerc. 
#
# 	A)	signature-file=" "  (an empty space)
#	B)	enable-alternate-editor-cmd
#	C)	enable-alternate-editor-implicitly (optional but recommended)
#	D) 	signature-at-bottom
#	E)	editor=<exact path to this script>

# INSTRUCTIONS FOR CONFIGURING PINESIGN
#
# The PGP program must be in your path, and the PGPPATH environment 
# variable must be defined.  See the PGP documentation for details.
#
# Double check that the first line of this program points to sh. 
#
# Edit the SIGPATH and PINEEDITOR variables to point at your signature 
# (if any) and the editor you wish to use for your Pine mail.  Default 
# signature will be the file .signature in your $HOME directory.  
# Default editor is pico -z -t.

SIGPATH=$HOME/.signature-pine
PINEEDITOR='pico -z -t'

# INSTRUCTIONS FOR USING PINESIGN
#
# When you compose a message, you will compose your message as normal.  
#
# When you exit your editor (control-X in Pico), you will receive a prompt 
# asking if you wish to add your signature file to the message.  If you 
# respond with y, Y or just press return, your text signature file (often 
# $HOME/.signature) will be appended to your message.  If you type  
# anything else, your message will not have your signature added.
#
# Next, you will be prompted as to whether you wish to PGP sign your
# message.  If you answer with y, Y or return, you will be prompted for your
# PGP passphrase and then dumped back to the address/subject section of
# Pine.  If you type anything else, your message will not be signed.  
#
# If you selected it to be added, your .signature file will be appended 
# AFTER your digital signature. 
#
# If you have not defined your alternate editor to be run implicitly, you 
# will need to start it manually.  If you do not run the alternate editor,
# your .signature file will not be appended and you will also have to do
# that manually.  It is highly recommended that your define your alternate
# editor to run implicitly. 

### DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ###

$PINEEDITOR $1

clear
echo -n "Would you like to add your ASCII signature to this message? [y] " 
read SIG
echo " "
echo -n "Would you like to sign this message with your PGP signature? [y] "
read PGP

if [ "$PGP" = "y" ]
	then 
		pgp -sat +comment="PGP Signed with PineSign 2.0" $1
		mv $1.asc $1
fi

if [ "$PGP" = "Y" ]
	then 
		pgp -sat +comment="PGP Signed with PineSign 2.0" $1
		mv $1.asc $1
fi

if [ "$PGP" = "" ]
	then 
		pgp -sat +comment="PGP Signed with PineSign 2.0" $1
		mv $1.asc $1
fi

if [ "$SIG" = "y" ]
	then 
		echo " " >> $1
		cat $SIGPATH >> $1
fi

if [ "$SIG" = "Y" ]
	then 
		echo " " >> $1
		cat $SIGPATH >> $1
fi

if [ "$SIG" = "" ]
	then 
		echo " " >> $1
		cat $SIGPATH >> $1
fi

____        Robert A. Hayden      <=> Cthulhu Matata
\  /__          -=-=-=-=-         <=>          -=-=-=-=-
 \/  /  Finger for Geek Code Info <=> [email-masked]
   \/   Finger for PGP Public Key <=> http://att2.cs.mankato.msus.edu/~hayden