Calling GPG from Perl from Procmail from...

Frank Tobin ftobin@uiuc.edu
Thu, 25 May 2000 08:31:45 -0500 (CDT)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave Wilson, at 13:59 +0100 on Thu, 25 May 2000, wrote:


> I have a script that I would like to run on incoming email messages,
> conditional on the GnuPG signature on each incoming message being verified.
Already done in pgpenvelope: http://pgpenvelope.sourceforge.net/ Note you don't need to use the Pine functionality of pgpenvelope if you don't want. It won't be sad. The Perl module it uses is GnuPG::Interface; you may be interested in looking into it: http://GnuPG-Interface.sourceforge.net/
> As far as I can tell, GnuPG returns an exit code of zero iff the
> signature was successfully verified. The rest of the script is
> conditional on $good == 0. This works fine when I run it from the
> command line. However, when run on an incoming message from Procmail,
> STDERR presents this:
The exit status is a bad way to check if the signature was verified; the exit status best represents that GnuPG exited properly. Check the signature status via the status-fd filehandle. Read the DETAILS file with GnuPG for, well, details.
> gpg: cannot open /dev/tty: Device not configured
You need to pass --no-tty. - -- Frank Tobin http://www.uiuc.edu/~ftobin/ "To learn what is good and what is to be valued, those truths which cannot be shaken or changed." Myst: The Book of Atrus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.1 (FreeBSD) Comment: pgpenvelope 2.8.6 - http://pgpenvelope.sourceforge.net/ iEYEARECAAYFAjktK1QACgkQVv/RCiYMT6PFngCePvuUffdWe2nE1KqnN6o/6nkM HN8AoKWx5Gn3QyJX1hWdc7xdL/Qv04sy =+A7z -----END PGP SIGNATURE-----