<<< Date Index >>>     <<< Thread Index >>>

Re: [Mutt] #3034: mutt-1.5.17: reply for gpg encrypted mails fails



#3034: mutt-1.5.17: reply for gpg encrypted mails fails

Comment (by Kyle Wheeler):

 {{{
 On Monday, February 18 at 07:19 PM, quoth Mutt:
 > When I reply to a gpg encryptd mail I don't get the decrypted mail
 > in the reply but instead
 >
 > On Mon, Feb 18, 2008 at 08:01:17PM +0100, Olaf Foellinger wrote:
 > > gpg: fatal: unable to reopen standard input, output, or error
 >
 > The gpg.rc is the standard one that comes with 1.5.17.
 >
 > I'm on Mac OS X 10.4.11.

 If I recall correctly, this was a problem with very recent versions of
 gpg and inline encryption (and inline signatures). GnuPG is attempting
 to be extra picky, and they're going overboard. As best as I can tell,
 it's a gpg problem, because mutt's gpg code is extremely simple, and
 does exactly what the gpg developers seem to think it should.

 GPG on MacOS X (10.4) gets made because it thinks mutt has closed one of
 its
 file descriptors. This is, of course, totally bogus, because not only
 does the same setup work fine on Linux, but it works fine for viewing
 messages (which uses the exact same code in mutt) but not replying.

 It's possible that it's a MacOS X bug, though (it wouldn't be the
 first time OSX has demonstrated problems with certain sequences of
 syscalls).

 There's a very simple workaround. I changed this line in my muttrc:

      set pgp_decode_command="~/.gpgwrapper.sh --status-fd=2 %?p
 ?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"

 Then, you make that ~/.gpgwrapper.sh script look like this:

      #!/bin/sh
      FDTWO=/tmp/gpg.$$.$RANDOM.2
      gpg "$@" 2>"$FDTWO"
      retval=$?
      cat "$FDTWO" >&2
      rm "$FDTWO"
      exit $retval

 ~Kyle
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3034#comment:>