notmuch reply is confused about multiple (or case-insensitive?) cc headers
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 17 Jun 2016 02:30:58 +0000 (22:30 +2000)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:06 +0000 (16:22 -0700)
37/f5fc0be82c9cc180295d7b81dd03c9f88373c6 [new file with mode: 0644]

diff --git a/37/f5fc0be82c9cc180295d7b81dd03c9f88373c6 b/37/f5fc0be82c9cc180295d7b81dd03c9f88373c6
new file mode 100644 (file)
index 0000000..de5d5f2
--- /dev/null
@@ -0,0 +1,164 @@
+Return-Path: <dkg@fifthhorseman.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id C27DD6DE01F7\r
+ for <notmuch@notmuchmail.org>; Thu, 16 Jun 2016 19:31:12 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.039\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.039 tagged_above=-999 required=5\r
+ tests=[AWL=-0.039] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id YrnE7PRJLKib for <notmuch@notmuchmail.org>;\r
+ Thu, 16 Jun 2016 19:31:04 -0700 (PDT)\r
+Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 1DD996DE00EB\r
+ for <notmuch@notmuchmail.org>; Thu, 16 Jun 2016 19:31:03 -0700 (PDT)\r
+Received: from fifthhorseman.net (unknown [108.58.6.98])\r
+ by che.mayfirst.org (Postfix) with ESMTPSA id F1578F99A\r
+ for <notmuch@notmuchmail.org>; Thu, 16 Jun 2016 22:31:02 -0400 (EDT)\r
+Received: by fifthhorseman.net (Postfix, from userid 1000)\r
+ id D663520050; Thu, 16 Jun 2016 22:31:01 -0400 (EDT)\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: notmuch reply is confused about multiple (or case-insensitive?) cc\r
+ headers\r
+User-Agent: Notmuch/0.22+69~gd812194 (https://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Thu, 16 Jun 2016 22:30:58 -0400\r
+Message-ID: <87d1ngv95p.fsf@alice.fifthhorseman.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+ micalg=pgp-sha512; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 17 Jun 2016 02:31:12 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+hey notmuchers--\r
+\r
+I'm using notmuch from close to git master.\r
+\r
+I just received an e-mail with headers like this:\r
+\r
+=2D-----\r
+From: Alice <alice@example.org>\r
+To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+Cc: Bob <bob@example.org>\r
+Subject: wowsers!\r
+cc: Charles <charles@example.org>\r
+Message-Id: <abc123@example.org>\r
+Date: Thu, 16 Jun 2016 22:14:41 -0400\r
+\r
+blah blah\r
+=2D-----\r
+\r
+Note the weirdness about the Cc fields!\r
+\r
+ https://tools.ietf.org/html/rfc5322#page-21\r
+\r
+Makes it clear that there is supposed to only be zero or one cc header\r
+in an e-mail, but notmuch-emacs is nice enough to show me both.\r
+\r
+However, if i do:\r
+\r
+  notmuch reply id:abc123@example.org\r
+\r
+then Charles is omitted:\r
+\r
+=2D---------\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+Subject: Re: wowsers!\r
+To: Alice <alice@example.org>\r
+Cc: Bob <bob@example.org>\r
+In-Reply-To: <abc123@example.org>\r
+References: <abc123@example.org>\r
+\r
+On Thu, 16 Jun 2016 22:14:41 -0400, Alice <alice@example.org> wrote:\r
+> blah blah\r
+=2D---------\r
+\r
+\r
+In json form:\r
+\r
+0 dkg@alice:~$ notmuch reply --format=3Djson id:abc123@example.org | json_p=\r
+p=20\r
+{\r
+   "reply-headers" : {\r
+      "From" : "Daniel Kahn Gillmor <dkg@fifthhorseman.net>",\r
+      "References" : "<abc123@example.org>",\r
+      "To" : "Alice <alice@example.org>",\r
+      "Cc" : "Bob <bob@example.org>",\r
+      "Subject" : "Re: wowsers!",\r
+      "In-reply-to" : "<abc123@example.org>"\r
+   },\r
+   "original" : {\r
+      "id" : "abc123@example.org",\r
+      "filename" : "REDACTED",\r
+      "timestamp" : 1466129681,\r
+      "match" : false,\r
+      "headers" : {\r
+         "Cc" : "Bob <bob@example.org>, Charles <charles@example.org>",\r
+         "Date" : "",\r
+         "Subject" : "wowsers!",\r
+         "From" : "Alice <alice@example.org>",\r
+         "To" : "Daniel Kahn Gillmor <dkg@fifthhorseman.net>"\r
+      },\r
+     "tags" : [],\r
+     "excluded" : false"\r
+   ...\r
+\r
+\r
+\r
+Note that we see Charles in original[headers[Cc]], but not in\r
+reply-headers[Cc].\r
+\r
+Seems to me like these two should agree.  We should either decide to\r
+take the strict interpretation of RFC 5322 or not.  I lean toward\r
+including Charles in both sets, fwiw.\r
+\r
+Anyway, smells like a bug in a weird corner case, and i haven't had time\r
+to track it down or fix it, but i figured i'd report it so that other\r
+people can see it.\r
+\r
+       --dkg\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2\r
+\r
+iQJ8BAEBCgBmBQJXY2DiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\r
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFREIyRTc0RjU2RkNGMkI2NzI5N0I3MzUy\r
+NEVDRkY1QUZGNjgzNzBBAAoJECTs/1r/aDcKitkP/R1e1NFFfiqsten5gS2rM8Bh\r
+zxyvj2VcJSxmHkff9EigFdJyc90svY30svqilBIdJd6AMNP5v/tu7TY2wdl7raTe\r
+KPKAwIgUQDCvYjp5ZmvN/EKwd1dwlL6bnRyL/DzALMWeQVdO1D8sV0ruOJBnh50f\r
+fG6ASw2IRMsc/u4le6T0uHjHESI7T8Pm9cYldKvLW8Gf0OXtSqA+qZWcvlqGS6uz\r
+KgMXWAQ+EtAEyOls7PrtnYQ5unFrHfQXf643x2xvPKO2IYpEoOIyci5LfMZIHsyR\r
+6haOP0JRBS8xnbK0bM6D4JT3JTMfwEY81ib4Z6fvVNDpM7YZODJWgGB+F0Rfp6yi\r
+MwlL62mP/yEn1dqZXGHxo4HXqTJykxkXLpBgSgWtcpOYm4dSE6oHczc2hvVWOxHS\r
+Fxww8dMcbFEz27f2IiTIp30vFwDVRCu5HVDmdnGBMq21ftXwt+shf5VMPdVS+nkO\r
+ngmJnKeaPU7MjQ7fPDb4h8sei3mUT5MJWB2/0VcFua8aMWNnXT9bHyZwMHvMp51C\r
+BsRLmigiUeKgyDdC8KBT2g6IrWh7QwgLDFJcht0EI07j6ociKyazZpDgN6Agvq48\r
++nRfpI3r5ACrvQcm3QBwQMPrsL6Q/cTyt9LgC/I51odMOUECIDYHfN5nuOfO1S7V\r
+IjAyY2SrpudqANZHnCqS\r
+=6f6q\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r