Ok, thanks, now the question is a bit off topic.

I tried to use a perl script to automate this, here is the code:

use PGP::Sign;
$PGP::Sign::PGPPATH = "/root/.pgp";

open(DATA, "$path/mutt.header.$$");
@data = <DATA>;
close DATA;

$keyid = "dns\@cia.com.au";
$passphrase = "hello world";
($signature, $version) = pgp_sign($keyid, $passphrase, @data);

open(DATAOUT, ">$path/mutt.header.out.$$");
print DATAOUT "-----BEGIN PGP SIGNED MESSAGE-----\n\n";
foreach $key (@data) {
        print DATAOUT "$key";
}
print DATAOUT "\n\n-----BEGIN PGP SIGNATURE-----\n";
print DATAOUT "Version: $version\n";
print DATAOUT "Charset: noconv\n\n";
print DATAOUT "$signature\n";
print DATAOUT "-----END PGP SIGNATURE-----\n";
close DATAOUT;

$a = `cat $path/mutt.header.out.$$ | mutt -H $path/mutt.header dns\@cia.com.au`;


now, the emails looks the exactly the same as the old style PGP signed
message, but when I view it in mutt, mutt shows that it is just a normal
message. Do I need to add additional header info such as Content-Type??

Or the above just the completely wrong way to do it??


Thanks.

Michael Elkins [[EMAIL PROTECTED]] wrote:
> On Fri, Jan 14, 2000 at 12:38:05PM +1100, Shao Zhang wrote:
> >     Is it possible to send a signed message using mutt and pgp5 from
> >     the command line??
> 
> Not in batch mode, but you could do something like
> 
>       mutt -e 'set pgp_autosign' [EMAIL PROTECTED]
> 
> to get a one time pgp signature.  The problem with batch mode is that mutt
> would have to ask you for your passphrase.
> 
> me
> -- 
> pgp key available from http://www.cs.hmc.edu/~me/elkins-pgp-key.asc



-- 
____________________________________________________________________________
Shao Zhang - Running Debian 2.1  ___ _               _____
Department of Communications    / __| |_  __ _ ___  |_  / |_  __ _ _ _  __ _ 
University of New South Wales   \__ \ ' \/ _` / _ \  / /| ' \/ _` | ' \/ _` |
Sydney, Australia               |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, |
Email: [EMAIL PROTECTED]                                                  |___/ 
_____________________________________________________________________________

PGP signature

Reply via email to