[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Email-Firewalls" / Instant Corporate PGP



From: [email protected]
> #!/bin/csh -f
> #
> #  Vince Cate
> 
> setenv PGPPATH /usr/vac/pgp
> setenv PGPPASS "not really vinces passphrase"
> 
> cd $PGPPATH
> 
> cat > mailtmp.asc
> 
> egrep 'Date:|From:|Subject:|To:' mailtmp.asc >  mailtmp
> echo " "                                     >> mailtmp
> 
> pgp -f < mailtmp.asc                         >> mailtmp
> 
> /usr/ucb/mail -s "Was encrypted" vac < mailtmp
> 
> exit 0

A more secure way is not to setenv PGPPASS but rather:
setenv PGPPASSFD 1
and then
(echo "vinces passphrase" ; cat mailtmp.asc) | pgp -f >> mailtmp

The PGPPASSFD means take the passphrase from file descriptor 1, which is
the standard input.  This way it never appears in the environment of a
process.  Many unix systems have a switch to ps to show all processes'
environments.

Hal