[Pkg-mutt-maintainers] Bug#833192: Overwrites Message-Id when using "mutt -H" or Alt-e to resend (breaks patch mail threading)

Josh Triplett josh at joshtriplett.org
Mon Aug 1 23:58:45 UTC 2016


Package: mutt
Version: 1.6.2-1
Severity: normal

When attempting to send a set of git patches recently, I noticed that
the mails had broken threading.  The mails had Message-Id, In-Reply-To,
and References headers threading them together.  However, mutt ignored
the Message-Id header in the mails, and overwrote the Message-Id with
a newly generated one.

This used to work correctly, so I tested this with several other
versions of mutt to determine when the problem occurred.  mutt 1.6.0-1
in testing has the same bug (so the neo patches didn't introduce this
issue).  mutt 1.5.23-3 in stable works correctly, preserving the
Message-Id.

Related upstream bug: https://dev.mutt.org/trac/ticket/3081

Looking at mutt_prepare_template in postpone.c, it contains the
following:
  /* If message_id is set, then we are resending a message and don't want
   * message_id or mail_followup_to. Otherwise, we are resuming a
   * postponed message, and want to keep the mail_followup_to.
   */
  if (newhdr->env->message_id != NULL)
  {
    FREE (&newhdr->env->message_id);
    FREE (&newhdr->env->mail_followup_to);
  }

However, mails prepared with git format-patch --thread, and sent with
any of mutt -H, Alt-e, or git imap-send to a draft and having mutt start
from that draft, will have a Message-Id that mutt should *not*
overwrite.

I can think of a couple of solutions to this.  I would argue that "mutt
-H" and sending drafts should never overwrite the Message-Id header
(though those should generate a Message-Id if none exists yet); for the
former, if the user wants to prepare a template mail that they'll send
repeatedly, they can leave the Message-Id out of that template to have
mutt generate a fresh one.

Alt-e for resending is a more questionable case; on the one hand,
resending a mail that was already sent should usually not reuse the
Message-Id, but on the other hand, using "mutt -f mbox" and sending a
pile of mails with Alt-e can be convenient.  I can think of two possible
solutions there.  One would be to provide a second command and
keybinding for resending a mail, so that one variant always overwrites
the Message-Id and the other keeps the existing Message-Id.  (Both would
generate one if the message doesn't have one.)  The other would be to
have a quadoption resend_keep_msgid; however, that would be inconvenient
for anyone who needs both versions, as answering a prompt repeatedly
would decrease the convenience of Alt-e.

Personally, I'd favor the "second command and keystroke" approach, but
any solution that fixes this issue would help.  And in the meantime, I
hope it's uncontroversial to have "mutt -H" or sending of postponed
drafts never overwrite the Message-Id.

- Josh Triplett

-- Package-specific info:
Mutt 1.6.2-neo (2016-07-23)
Copyright (C) 1996-2016 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: Linux 4.7.0-rc7-amd64 (x86_64)
libidn: 1.33 (compiled with 1.33)
hcache backend: tokyocabinet 1.4.48

Compiler:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 5.4.0-6' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Debian 5.4.0-6) 

Configure options: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=\${prefix}/include' '--mandir=\${prefix}/share/man' '--infodir=\${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=\${prefix}/lib/x86_64-linux-gnu' '--libexecdir=\${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' '--with-mailpath=/var/mail' '--enable-compressed' '--enable-debug' '--enable-fcntl' '--enable-hcache' '--enable-gpgme' '--enable-imap' '--enable-smtp' '--enable-pop' '--enable-sidebar' '--enable-nntp' '--enable-notmuch' '--with-curses' '--with-gnutls' '--with-gss' '--with-idn' '--with-mixmaster' '--with-sasl' '--without-gdbm' '--without-bdb' '--without-qdbm' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security' 'LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'

Compilation CFLAGS: -Wall -pedantic -Wno-long-long -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security

Compile options:
+CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME +CRYPT_BACKEND_GPGME 
+DEBUG +DL_STANDALONE +ENABLE_NLS -EXACT_ADDRESS -HOMESPOOL -LOCALES_HACK 
-SUN_ATTACHMENT +HAVE_BKGDSET +HAVE_COLOR +HAVE_CURS_SET +HAVE_GETADDRINFO 
+HAVE_GETSID +HAVE_ICONV +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR 
+HAVE_LIBIDN +HAVE_META +HAVE_REGCOMP +HAVE_RESIZETERM +HAVE_START_COLOR 
+HAVE_TYPEAHEAD +HAVE_WC_FUNCS +ICONV_NONTRANS +USE_COMPRESSED +USE_DOTLOCK 
+USE_FCNTL -USE_FLOCK -USE_GNU_REGEX +USE_GSS +USE_HCACHE +USE_IMAP 
+USE_NOTMUCH +USE_NNTP +USE_POP +USE_SASL +USE_SETGID +USE_SIDEBAR +USE_SMTP 
+USE_SSL_GNUTLS -USE_SSL_OPENSSL 
-DOMAIN
MIXMASTER="mixmaster"
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"

patch-quasi-delete-neo-git
patch-progress-neo-git
patch-status-color-neo-git
patch-index-color-neo-git
patch-nested-if-neo-git
patch-cond-date-neo-git
patch-tls-sni-neo-git
patch-sidebar-neo-git
patch-ifdef-neo-git
patch-fmemopen-neo-git
patch-initials-neo-git
patch-trash-neo-git
patch-limit-current-thread-neo-git
patch-skip-quoted-neo-git
patch-compress-neo-git
patch-keywords-neo-git
patch-nntp-neo-git
patch-lmdb-neo-git
patch-1.5.23.smime-encrypt-self.1
patch-new-mail-neo-git
patch-smime-encrypt-to-self-neo-git
patch-sensible-browser-neo-UNKNOWN

To learn more about NeoMutt, visit: http://www.neomutt.org/
If you find a bug in NeoMutt, please raise an issue at:
    https://github.com/neomutt/neomutt/issues
or contact the lead developer: Richard Russon <rich at flatcap.org>


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.7.0-rc7-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mutt depends on:
ii  libassuan0        2.4.3-1
ii  libc6             2.23-4
ii  libcomerr2        1.43.1-1
ii  libgnutls30       3.5.2-2
ii  libgpg-error0     1.24-1
ii  libgpgme11        1.6.0-3
ii  libgssapi-krb5-2  1.14.3+dfsg-1
ii  libidn11          1.33-1
ii  libk5crypto3      1.14.3+dfsg-1
ii  libkrb5-3         1.14.3+dfsg-1
ii  libncursesw5      6.0+20160625-1
ii  libnotmuch4       0.22.1-2
ii  libsasl2-2        2.1.26.dfsg1-15
ii  libtinfo5         6.0+20160625-1
ii  libtokyocabinet9  1.4.48-10

Versions of packages mutt recommends:
ii  libsasl2-modules  2.1.26.dfsg1-15
pn  locales           <none>
ii  mime-support      3.60

Versions of packages mutt suggests:
ii  aspell                              0.60.7~20110707-3+b1
ii  ca-certificates                     20160104
pn  default-mta | mail-transport-agent  <none>
ii  gnupg                               1.4.20-6
pn  mixmaster                           <none>
ii  openssl                             1.0.2h-1
pn  urlview                             <none>

Versions of packages mutt is related to:
ii  mutt  1.6.2-1

-- no debconf information



More information about the Pkg-mutt-maintainers mailing list