notmuch reply is confused about multiple (or case-insensitive?) cc headers

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Jun 16 19:30:58 PDT 2016


hey notmuchers--

I'm using notmuch from close to git master.

I just received an e-mail with headers like this:

------
From: Alice <alice at example.org>
To: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Cc: Bob <bob at example.org>
Subject: wowsers!
cc: Charles <charles at example.org>
Message-Id: <abc123 at example.org>
Date: Thu, 16 Jun 2016 22:14:41 -0400

blah blah
------

Note the weirdness about the Cc fields!

 https://tools.ietf.org/html/rfc5322#page-21

Makes it clear that there is supposed to only be zero or one cc header
in an e-mail, but notmuch-emacs is nice enough to show me both.

However, if i do:

  notmuch reply id:abc123 at example.org

then Charles is omitted:

----------
From: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Subject: Re: wowsers!
To: Alice <alice at example.org>
Cc: Bob <bob at example.org>
In-Reply-To: <abc123 at example.org>
References: <abc123 at example.org>

On Thu, 16 Jun 2016 22:14:41 -0400, Alice <alice at example.org> wrote:
> blah blah
----------


In json form:

0 dkg at alice:~$ notmuch reply --format=json id:abc123 at example.org | json_pp 
{
   "reply-headers" : {
      "From" : "Daniel Kahn Gillmor <dkg at fifthhorseman.net>",
      "References" : "<abc123 at example.org>",
      "To" : "Alice <alice at example.org>",
      "Cc" : "Bob <bob at example.org>",
      "Subject" : "Re: wowsers!",
      "In-reply-to" : "<abc123 at example.org>"
   },
   "original" : {
      "id" : "abc123 at example.org",
      "filename" : "REDACTED",
      "timestamp" : 1466129681,
      "match" : false,
      "headers" : {
         "Cc" : "Bob <bob at example.org>, Charles <charles at example.org>",
         "Date" : "",
         "Subject" : "wowsers!",
         "From" : "Alice <alice at example.org>",
         "To" : "Daniel Kahn Gillmor <dkg at fifthhorseman.net>"
      },
     "tags" : [],
     "excluded" : false"
   ...



Note that we see Charles in original[headers[Cc]], but not in
reply-headers[Cc].

Seems to me like these two should agree.  We should either decide to
take the strict interpretation of RFC 5322 or not.  I lean toward
including Charles in both sets, fwiw.

Anyway, smells like a bug in a weird corner case, and i haven't had time
to track it down or fix it, but i figured i'd report it so that other
people can see it.

       --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 948 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20160616/186e0441/attachment.sig>


More information about the notmuch mailing list