Package: mutt
Version: 1.5.20-6
Severity: normal
Tags: patch

When giving a "References" header in a "mailto:"; URL, it does not end
up in the final message. Running mutt in gdb shows that it gets
successfully parsed and put in the envelope of the message (very
precisely, it gets put in the ENVELOPE structure for the message), but
after editing the message, the References header is removed. The
comment around where it is done (see attached patch) suggests that
this is because mutt believes the user *removed* the In-Reply-To
header. But there was none to start with, so the user did not remove
it. The attached patch fixes the removal condition to not trigger if
there was no In-Reply-To header in the message before editing.

To reproduce the bug:

  mutt 'mailto:[email protected]?references=<m...@localhost>&Subject=Test'

Send the mail, see it has no "References" header. Compare with

  mutt 
'mailto:[email protected]?references=<m...@localhost>&In-Reply-To=<y...@localhost>&Subject=Test'

Where both headers will be present.

-- Package-specific info:
Mutt 1.5.20 (2009-06-14)
Copyright (C) 1996-2009 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 2.6.32-trunk-amd64 (x86_64)
ncurses: ncurses 5.7.20090803 (compiled with 5.7)
libidn: 1.15 (compiled with 1.15)
hcache backend: GDBM version 1.8.3. 10/15/2002 (built Nov 21 2009 09:33:57)
Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL  -USE_FLOCK   
+USE_POP  +USE_IMAP  +USE_SMTP  
-USE_SSL_OPENSSL  +USE_SSL_GNUTLS  +USE_SASL  +USE_GSS  +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  +COMPRESSED  +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="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"
To contact the developers, please mail to <[email protected]>.
To report a bug, please visit http://bugs.mutt.org/.

patch-1.5.13.cd.ifdef.2

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

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mutt depends on:
ii  libc6                     2.10.2-3       Embedded GNU C Library: Shared lib
ii  libcomerr2                1.41.9-1       common error description library
ii  libgdbm3                  1.8.3-9        GNU dbm database routines (runtime
ii  libgnutls26               2.8.5-2        the GNU TLS library - runtime libr
ii  libgpg-error0             1.6-1          library for common error values an
ii  libgpgme11                1.2.0-1.2      GPGME - GnuPG Made Easy
ii  libgssapi-krb5-2          1.7+dfsg-4     MIT Kerberos runtime libraries - k
ii  libidn11                  1.15-2         GNU Libidn library, implementation
ii  libk5crypto3              1.7+dfsg-4     MIT Kerberos runtime libraries - C
ii  libkrb5-3                 1.7+dfsg-4     MIT Kerberos runtime libraries
ii  libncursesw5              5.7+20090803-2 shared libraries for terminal hand
ii  libsasl2-2                2.1.23.dfsg1-5 Cyrus SASL - authentication abstra

Versions of packages mutt recommends:
ii  exim4-daemon-heavy [mail- 4.71-3         Exim MTA (v4) daemon with extended
ii  libsasl2-modules          2.1.23.dfsg1-5 Cyrus SASL - pluggable authenticat
ii  locales                   2.10.2-3       Embedded GNU C Library: National L
ii  mime-support              3.48-1         MIME files 'mime.types' & 'mailcap

Versions of packages mutt suggests:
ii  aspell                        0.60.6-2   GNU Aspell spell-checker
ii  ca-certificates               20090814   Common CA certificates
ii  gnupg                         1.4.10-2   GNU privacy guard - a free PGP rep
ii  ispell                        3.1.20.0-7 International Ispell (an interacti
pn  mixmaster                     <none>     (no description available)
ii  openssl                       0.9.8k-7   Secure Socket Layer (SSL) binary a
pn  urlview                       <none>     (no description available)

Versions of packages mutt is related to:
ii  mutt                          1.5.20-6   text-based mailreader supporting M
pn  mutt-dbg                      <none>     (no description available)
pn  mutt-patched                  <none>     (no description available)

-- no debconf information
Index: mutt-1.5.20/headers.c
===================================================================
--- mutt-1.5.20.orig/headers.c  2010-02-03 17:24:34.506471703 +0100
+++ mutt-1.5.20/headers.c       2010-02-03 17:28:25.166470158 +0100
@@ -114,8 +114,8 @@
      $edit_headers set, we remove References: as they're likely invalid;
      we can simply compare strings as we don't generate References for
      multiple Message-Ids in IRT anyways */
-  if (!n->in_reply_to || (msg->env->in_reply_to &&
-                         mutt_strcmp (n->in_reply_to->data,
+  if (msg->env->in_reply_to &&
+      (!n->in_reply_to || mutt_strcmp (n->in_reply_to->data,
                                       msg->env->in_reply_to->data) != 0))
     mutt_free_list (&msg->env->references);
 

Reply via email to