1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by arlo.cworth.org (Postfix) with ESMTP id 813CF6DE38DE
\r
6 for <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 04:39:14 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=0.287 tagged_above=-999 required=5 tests=[AWL=1.007,
\r
13 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,
\r
14 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled
\r
15 Received: from arlo.cworth.org ([127.0.0.1])
\r
16 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id A4O2DLaEoskB for <notmuch@notmuchmail.org>;
\r
18 Sat, 13 Aug 2016 04:39:05 -0700 (PDT)
\r
19 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com
\r
20 [74.125.82.67]) by arlo.cworth.org (Postfix) with ESMTPS id ED02E6DE3856 for
\r
21 <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 04:39:04 -0700 (PDT)
\r
22 Received: by mail-wm0-f67.google.com with SMTP id i5so2016185wmg.2
\r
23 for <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 04:39:04 -0700 (PDT)
\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=nikula-org.20150623.gappssmtp.com; s=20150623;
\r
26 h=from:to:cc:subject:date:message-id:in-reply-to:references
\r
27 :in-reply-to:references;
\r
28 bh=MqUvdPEzLcM1AS99XOhBgD9cHCnU0FvV2NoTJNRdIJM=;
\r
29 b=qn4O3wb+YSpif6ZLd9oPuwyfHL/OUPOEJEBe/UAJQi8aLy5IVsS7Jk7yRF9WkiQjEm
\r
30 YTHX3Sg62vfiDOyPdDO73gWSdoAe5/vY+nt0Ql/6iBl7QbjKeMaFZbqHD1mlstpwe1Cs
\r
31 ZCov9RMoq+ObyDcWVA7UO2jpWPuzlHa29/FjgSvtsYDkNNafoVFTYom4+9Kpos6CcbJ1
\r
32 eY2ONvJvHpBUBLr6F+/Tt+hLa6+9qRuevgjSLJ+t1M3G01wSLJCAypbb46RiGS8hXHag
\r
33 lkAfRyHjz65YnR8VSzK/zcIPPkvzdWvvEmPOO0FqE2uUmevSdielU4ds2UBGqOayA3sR
\r
35 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
36 d=1e100.net; s=20130820;
\r
37 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
38 :references:in-reply-to:references;
\r
39 bh=MqUvdPEzLcM1AS99XOhBgD9cHCnU0FvV2NoTJNRdIJM=;
\r
40 b=OyclY3Ey4+i9sWRyuMIOPZP/o6g60KAhErKlBp2NIkYcPEzEQA40cUvdKCXmIFN1mp
\r
41 uMZd4qvY7n3NEed3WOBCHZFryaYjVmVBL23NF3QofzJKr7g5ewms6G+bcyKX0sZVEnoc
\r
42 mGOJUvQ8f+kwypHLE/5C7l4lW7wMMgSyTE55pMpuI06N39cg2Vz/E6WNJlNNDuKqUNkb
\r
43 d+ui6ZsIpC3RW+kTlZeXjXRBkECuyeWghv8udQANDFBFLE5taue0JUOMf7PyLNJt0pOO
\r
44 /OyzDyW7yRvnv8yM2pZsMTG4XKxrtoUYvKaAKQIAyH3nq8FPpSH98ACOKhjxxLq9k+hP
\r
47 AEkoout3UZLNPHyWC7hZggnTX8WY0tFPmSuxtcojUB7VeSUbWsDA0LAn6KNvP8zl/LGhgw==
\r
48 X-Received: by 10.195.13.18 with SMTP id eu18mr19662613wjd.121.1471088343587;
\r
49 Sat, 13 Aug 2016 04:39:03 -0700 (PDT)
\r
50 Received: from localhost (dsl-hkibrasgw2-58c368-70.dhcp.inet.fi.
\r
52 by smtp.gmail.com with ESMTPSA id d7sm11802590wjg.13.2016.08.13.04.39.02
\r
53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
54 Sat, 13 Aug 2016 04:39:03 -0700 (PDT)
\r
55 From: Jani Nikula <jani@nikula.org>
\r
56 To: notmuch@notmuchmail.org
\r
57 Cc: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
\r
59 Subject: [PATCH v2 01/14] test: add known broken test for reply to message
\r
60 with multiple Cc headers
\r
61 Date: Sat, 13 Aug 2016 14:37:25 +0300
\r
63 <8c280fe978c12eccb662b0ebc97d9d3c794f6688.1471088022.git.jani@nikula.org>
\r
64 X-Mailer: git-send-email 2.1.4
\r
65 In-Reply-To: <cover.1471088022.git.jani@nikula.org>
\r
66 References: <cover.1471088022.git.jani@nikula.org>
\r
67 In-Reply-To: <cover.1471088022.git.jani@nikula.org>
\r
68 References: <cover.1471088022.git.jani@nikula.org>
\r
69 X-BeenThere: notmuch@notmuchmail.org
\r
70 X-Mailman-Version: 2.1.20
\r
72 List-Id: "Use and development of the notmuch mail system."
\r
73 <notmuch.notmuchmail.org>
\r
74 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
75 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
76 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
77 List-Post: <mailto:notmuch@notmuchmail.org>
\r
78 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
79 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
80 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
81 X-List-Received-Date: Sat, 13 Aug 2016 11:39:14 -0000
\r
83 As Daniel Kahn Gillmor <dkg@fifthhorseman.net> reports in
\r
84 id:87d1ngv95p.fsf@alice.fifthhorseman.net, notmuch show combines
\r
85 multiple Cc: fields into one, while notmuch reply does not. While such
\r
86 messages are in violation of RFC 5322, it would be reasonable to
\r
87 expect notmuch to be consistent. Add a known broken test to document
\r
92 The original message is formatted using the message printing in
\r
93 notmuch-show.c. For Cc:, it uses g_mime_message_get_recipients(),
\r
94 which apparently combines all Cc: fields into one internally.
\r
96 The addresses in the reply headers, OTOH, are based on headers queried
\r
97 through libnotmuch. It boils down to g_mime_object_get_header() in
\r
98 lib/message-file.c, which returns only the first occurence of header.
\r
100 test/T220-reply.sh | 25 +++++++++++++++++++++++++
\r
101 1 file changed, 25 insertions(+)
\r
103 diff --git a/test/T220-reply.sh b/test/T220-reply.sh
\r
104 index 30b78f679d97..d6f3a839ca48 100755
\r
105 --- a/test/T220-reply.sh
\r
106 +++ b/test/T220-reply.sh
\r
107 @@ -253,5 +253,30 @@ test_expect_equal_json "$output" '
\r
111 +test_begin_subtest "Reply to a message with multiple Cc headers"
\r
112 +test_subtest_known_broken
\r
113 +cat > "${MAIL_DIR}"/broken_cc <<EOF
\r
114 +From: Alice <alice@example.org>
\r
115 +To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
\r
116 +Cc: Bob <bob@example.org>
\r
118 +cc: Charles <charles@example.org>
\r
119 +Message-Id: <abc123@example.org>
\r
120 +Date: Thu, 16 Jun 2016 22:14:41 -0400
\r
122 +Note the Cc: and cc: headers.
\r
124 +notmuch new >/dev/null
\r
125 +output=$(notmuch reply id:abc123@example.org)
\r
126 +notmuch reply id:abc123@example.com
\r
127 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
128 +Subject: Re: wowsers!
\r
129 +To: Alice <alice@example.org>, Daniel Kahn Gillmor <dkg@fifthhorseman.net>
\r
130 +Cc: Bob <bob@example.org>, Charles <charles@example.org>
\r
131 +In-Reply-To: <abc123@example.org>
\r
132 +References: <abc123@example.org>
\r
134 +On Thu, 16 Jun 2016 22:14:41 -0400, Alice <alice@example.org> wrote:
\r
135 +> Note the Cc: and cc: headers."
\r