signing mails with MUA mutt fails

Matthias Apitz guru at unixarea.de
Wed Dec 23 18:54:07 CET 2015



Hello,

To sign mails one configure in the MUA the command in the following
form:

gpg2 --batch --output - --passphrase-fd 0 --armor --sign --detach-sign --textmode -u %a %f

where %a is the actual user and %f the mail attachment to be signed; it
does not work and I digged into this;

this works as it should:

$ gpg2  --output - --armor --sign --detach-sign -u guru msg.asc
Please enter the passphrase to unlock the OpenPGP secret key:
"Matthias Apitz (GnuPGv2) <guru at unixarea.de>"
2048-bit DSA key, ID FFEE762B922A6CBB,
created 2015-12-22.

 Passphrase: 
-----BEGIN PGP SIGNATURE-----

iF4EABEIAAYFAlZ63U8ACgkQ/+52K5IqbLuC+wD/RnSo6soMzg0wxTdAFEbD2ykB
Yc15kIv7SPBXDoKohvcA/jUN2FNNEhlrrh5B/gAldFyYsJ7ruD5ktPa3b/DfpEP3
=DXMS
-----END PGP SIGNATURE-----

while this gives an error:

$ killall gpg-agent
$ echo xxxxxxxx | gpg2 --batch --output - --passphrase-fd 0 --armor --sign --detach-sign --textmode -u guru msg.asc gpg: signing failed:
gpg: signing failed: Invalid IPC response
gpg: signing failed: Invalid IPC response

running with --debug gives some kind of error in the communication with
the agent: 

$ killall gpg-agent
$ echo xxxxxxxx | gpg2 --debug 1024 --batch --output - --passphrase-fd 0 --armor --sign --detach-sign --textmode -u guru msg.asc
gpg: reading options from '/home/guru/.gnupg/gpg.conf'
gpg: enabled debug flags: ipc
gpg: DBG: chan_7 <- OK Pleased to meet you
gpg: DBG: connection to agent established
gpg: DBG: chan_7 -> RESET
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> OPTION ttytype=rxvt
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> OPTION display=:0
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> OPTION xauthority=/tmp/kde-guru/xauth-1001-_0
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> OPTION putenv=DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-O4oooGN9t0,guid=4cf4542b4bf772f2892b2ac3567aaf2d
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> OPTION allow-pinentry-notify
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> OPTION agent-awareness=2.1.0
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> AGENT_ID
gpg: DBG: chan_7 <- ERR 67109139 Unknown IPC command <GPG Agent>
gpg: DBG: chan_7 -> HAVEKEY EF8AE0E0D3D7EBBFA6A0230CD105E0DFC04D9DE1 8FB0DD8249EC4A24E2A73B4721098FCDE815FEBB
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> RESET
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> SIGKEY EF8AE0E0D3D7EBBFA6A0230CD105E0DFC04D9DE1
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> SETKEYDESC Please+enter+the+passphrase+to+unlock+the+OpenPGP+secret+key:%0A%22Matthias+Apitz+(GnuPGv2)+<guru at unixarea.de>%22%0A2048-bit+DSA+key,+ID+FFEE762B922A6CBB,%0Acreated+2015-12-22.%0A
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> SETHASH 8 B0E553EDE7C732CA26D96C45C32E6143AB642BF28E03217400C893CCB0F14B62
gpg: DBG: chan_7 <- OK
gpg: DBG: chan_7 -> PKSIGN
gpg: DBG: chan_7 <- INQUIRE PINENTRY_LAUNCHED 4886
gpg: DBG: chan_7 -> END
gpg: DBG: chan_7 <- ERR 83886340 Invalid IPC response <Pinentry>
gpg: signing failed: Invalid IPC response
gpg: signing failed: Invalid IPC response
gpg: secmem usage: 1568/32768 bytes in 3 blocks

What do I miss or do wrong?

	matthias

-- 
Matthias Apitz, ✉ guru at unixarea.de, 🌐 http://www.unixarea.de/  ☎ +49-176-38902045



More information about the Gnupg-users mailing list