List the recipients of a message
John A. Martin
jam@jamux.com
Fri Jun 15 20:14:01 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "PDJ" == Pedro Diaz Jimenez
>>>>> "List the recipients of a message"
>>>>> Thu, 14 Jun 2001 16:03:14 +0000
PDJ> Does anybody know how to list the recipients of an encrypted
PDJ> message?.
'whoto filename'
- -------------- cut here ---->8 ---< head
#!/bin/bash
tokeys=`cat $1 | \
gpg --batch --decrypt --list-only --status-fd 1 2>/dev/null | \
awk '/^\[GNUPG:\] ENC_TO / { print $3 }'`
[ -n "$tokeys" ] && gpg --list-keys $tokeys | grep -v sub
- ---- 8<------- cut here ----------> tail
jam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: OpenPGP encrypted mail preferred. See <http://www.gnupg.org/>
iEYEARECAAYFAjsqT/YACgkQUEvv1b/iXy/KVgCdExyY/g8y4azuT7kuyCCrgDl2
bP4AnRcDTDzf6j1IdrqtEMFiIaRMua12
=8byX
-----END PGP SIGNATURE-----