Ticket #3034 (new defect)

Opened 9 months ago

Last modified 9 months ago

mutt-1.5.17: reply for gpg encrypted mails fails

Reported by: olaf@… Owned by: mutt-dev
Priority: major Milestone:
Component: mutt Version:
Keywords: Cc:

Description

Package: mutt
Version: 1.5.17
Severity: normal

-- Please type your report below this line

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.




-- System Information
System Version: Darwin merlin.homenet.mine 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386

-- Build environment information

(Note: This is the build environment installed on the system
muttbug is run on.  Information may or may not match the environment
used to build mutt.)

- gcc version information
/usr/bin/gcc-4.0
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --with-arch=nocona --with-tune=generic --program-prefix= --host=i686-apple-darwin8 --target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5367)

- CFLAGS
-O2

-- Mutt Version Information

Mutt 1.5.17 (2007-11-01)
Copyright (C) 1996-2007 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Darwin 8.11.1 (i386)
ncurses: ncurses 5.6.20061217 (compiled with 5.6)
libiconv: 1.11
libidn: 1.0 (compiled with 1.0)
hcache backend: Sleepycat Software: Berkeley DB 4.4.20: (January 10, 2006)
Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL  -USE_SETGID  +USE_DOTLOCK  -DL_STANDALONE  
+USE_FCNTL  -USE_FLOCK   -USE_INODESORT   
+USE_POP  +USE_IMAP  -USE_SMTP  -USE_GSS  +USE_SSL_OPENSSL  -USE_SSL_GNUTLS  -USE_SASL  +HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  +CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  +USE_HCACHE  
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/opt/local/share/mutt"
SYSCONFDIR="/opt/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please visit http://bugs.mutt.org/.


--- Begin /Users/ergo/.mutt/muttrc
source ~/.mutt/gpg.rc
set header_cache = "~/.mutt/headers"
set mime_forward=ask-yes
set forward_format=[Fwd:%s]
set ispell="/opt/local/bin/aspell -c --mode=email --lang=de_DE"
set mbox_type="mbox"
set confirmappend=no
set pager_index_lines=10
set implicit_autoview=yes
set sig_dashes=no
set pgp_create_traditional=yes
set envelope_from=yes
set auto_tag=yes
alternates olaf@foellinger.de
score ~P 2
set hostname="foellinger.de"
set allow_8bit  # Don't do any Quoted-Printable encoding on 8-bit data!
set copy=yes    # Ask me if I want to save a copy of my outgoing messages.
set delete=yes
set noaskcc
set sendmail_wait=10
set reverse_alias
set reverse_name=yes
set realname="Olaf Foellinger"
set attribution="* %n <%a> [%(%d.%m.%y %H:%M)]wrote:\n"
set editor="vim -c 'set tw=72'"
set mbox=+inbox
set record=+outbox      # where to save copies of my outgoing messages
set nosave_empty
set folder=~/Mail
set print=ask-no
set mbox=+inbox
set folder=~/Mail
set sort=threads
set noprompt_after
my_hdr From: olaf@foellinger.de (Olaf Foellinger)
set status_format="%r %v [%?M?%M/?%m] %?n?%n new, ?%?p?%p postponed, ?%?t?%t +tagged, ?%?d?%d deleted, ?(%h:%f) %?b?%b more to go.?%> %r"
set index_format="%4C%Z%{%b%d}%-15.15L(%4c)%s"
set alias_file="~/.aliases"
set quote_regexp="^([A-Za-z ]+>|[]>:|}-][]>:|}-]*)"
set include
set hdr_format="%4C %Z %{%b %d} %-15.15n (%4l) %s"
set move=no
macro index S "| /opt/local/bin/sa-learn --spam --no-sync --single\n<delete-message>" "Learning Spammer's"
macro pager S "| /opt/local/bin/sa-learn --spam --no-sync --single\n<delete-message>" "Learning Spammer's"
macro index D "| /opt/local/bin/sa-learn --ham --no-sync --single\n" "DeSPAMming"
macro pager D "| /opt/local/bin/sa-learn --ham --no-sync --single\n"  "DeSPAMming"
set pipe_decode
color hdrdefault black white 
color header brightcyan white Subject:
color header blue white From:
color header black white To:
color header black white X-Mailer:
color header black white Cc:
color header black white Date:
color message black white 
color body red white [_a-z\.\$A-Z0-9-]+@[a-zA-Z0-9\./\-]+
color body red white (http|ftp)://[_a-zA-Z0-9\./~\-]+
color quoted green white
color signature brightblue white
color indicator white blue
color attachment yellow white
color tree red white
color status yellow blue
color tilde blue white
color normal black white
ignore *
unignore from: date to cc subject x-mailer resent-from reply-to to:
lists macports darwinports goban-users darwinports-bugs gcompris wikia
mailboxes Mail/IN.macports-users Mail/IN.macports-dev Mail/IN.macports-tickets Mail/IN.macports-changes Mail/IN.cvs-darwinports-all Mail/IN.gcompris Mail/IN.Spam Mail/IN.search-wikia Mail/IN.logcheck imaps://olaf.foellinger@imap.googlemail.com/
folder-hook . exec collapse-all
folder-hook +outbox 'set hdr_format="%4C %Z %{%b %d} %-15.15t (%4l) %s"'
source ~/.aliases
--- End /Users/ergo/.mutt/muttrc


--- Begin /opt/local/etc/Muttrc
ignore "from " received content- mime-version status x-status message-id
ignore sender references return-path lines
macro index \eb "<search>~b " "search in message bodies"
macro index,pager,attach,compose \cb "\
<enter-command> set my_pipe_decode=\$pipe_decode pipe_decode<Enter>\
<pipe-message> urlview<Enter>\
<enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \
"call urlview to extract URLs out of a message"
macro generic,pager <F1> "<shell-escape> less /opt/local/share/doc/mutt/manual.txt<Enter>" "show Mutt documentation"
macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
bind browser y exit
attachments   +A */.*
attachments   -A text/x-vcard application/pgp.*
attachments   -A application/x-pkcs7-.*
attachments   +I text/plain
attachments   -A message/external-body
attachments   -I message/external-body
--- End /opt/local/etc/Muttrc

Attachments

part0001.pgp (196 bytes) - added by Kyle Wheeler 9 months ago.
Added by email2trac

Change History

Changed 9 months ago by Kyle Wheeler

Added by email2trac

Changed 9 months ago 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

Changed 9 months ago by Olaf Foellinger

Hi,

* Mutt <fleas@mutt.org> [18.02.08 20:42]wrote:

> #3034: mutt-1.5.17: reply for gpg encrypted mails fails
> 
> Comment (by Kyle Wheeler):
> 
>  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:>

thank you very much, this works perfectly for me, too.

Gruß Olaf
Note: See TracTickets for help on using tickets.