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 olra.theworths.org (Postfix) with ESMTP id E52F1429E26
\r
6 for <notmuch@notmuchmail.org>; Sat, 2 Mar 2013 11:55:35 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id cJpyFp+iiec2 for <notmuch@notmuchmail.org>;
\r
17 Sat, 2 Mar 2013 11:55:34 -0800 (PST)
\r
18 Received: from mail-la0-f53.google.com (mail-la0-f53.google.com
\r
19 [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 32049431FC3
\r
22 for <notmuch@notmuchmail.org>; Sat, 2 Mar 2013 11:55:30 -0800 (PST)
\r
23 Received: by mail-la0-f53.google.com with SMTP id fr10so3958347lab.12
\r
24 for <notmuch@notmuchmail.org>; Sat, 02 Mar 2013 11:55:28 -0800 (PST)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=google.com; s=20120113;
\r
27 h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to
\r
28 :references:in-reply-to:references:x-gm-message-state;
\r
29 bh=m0fw6oVS9PsyQrii0F84pm4AVAOK93SPofxcXyDBZtE=;
\r
30 b=BdtLWbgriCinl5Yr66N7hdjE6XBzgFLqCqG1NOKvT+8X2G7TZ++hKt4ik48vvQFu7d
\r
31 Lm8JFkp05BN6TrMgAS8L+RgH6ZWg8n/nkFmiVUspeb6y57aJaLXiAPf+3tPlTSBD41Ei
\r
32 YDxltBF1wZwLvtBLfsQ6vXYoq4ydJFpWGRdbEUcND3wEdrGxgIAGvn1P08jvTXygza0T
\r
33 R7vC69k5EiKA7VWT6gwtAW0bVJNrF3HsTS1XZNfO+O7OjMX4ajXHkC7pMSl2QBGk3EyD
\r
34 hNIHE2IPZvCHf2zq6PqtKrOJj/3SCSCfuElVZFjbvI6v+H7yOavoHQmBGqpO5XfC6RWI
\r
36 X-Received: by 10.152.46.17 with SMTP id r17mr13047373lam.47.1362254128497;
\r
37 Sat, 02 Mar 2013 11:55:28 -0800 (PST)
\r
38 Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.
\r
40 by mx.google.com with ESMTPS id ng6sm8940635lab.2.2013.03.02.11.55.26
\r
41 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
42 Sat, 02 Mar 2013 11:55:27 -0800 (PST)
\r
43 From: Jani Nikula <jani@nikula.org>
\r
44 To: notmuch@notmuchmail.org
\r
45 Subject: [RFC PATCH 3/3] cli: support Mail-Followup-To: in notmuch reply
\r
46 Date: Sat, 2 Mar 2013 21:55:21 +0200
\r
48 <f9c7258be72bec0b174553db0410c29eba2745fa.1362254104.git.jani@nikula.org>
\r
49 X-Mailer: git-send-email 1.7.10.4
\r
51 <5eaa3acc22ee5513bdce5ab931b7a79ade880e06.1362254104.git.jani@nikula.org>
\r
53 <5eaa3acc22ee5513bdce5ab931b7a79ade880e06.1362254104.git.jani@nikula.org>
\r
55 <5eaa3acc22ee5513bdce5ab931b7a79ade880e06.1362254104.git.jani@nikula.org>
\r
57 <5eaa3acc22ee5513bdce5ab931b7a79ade880e06.1362254104.git.jani@nikula.org>
\r
59 ALoCoQnENX3peeFiDoDAWR6l302DpC0wStKKHdWJfHPtba0plNfof/PUqJ1B3oPDOPsb+kAAfZrm
\r
60 X-BeenThere: notmuch@notmuchmail.org
\r
61 X-Mailman-Version: 2.1.13
\r
63 List-Id: "Use and development of the notmuch mail system."
\r
64 <notmuch.notmuchmail.org>
\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
68 List-Post: <mailto:notmuch@notmuchmail.org>
\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
72 X-List-Received-Date: Sat, 02 Mar 2013 19:55:36 -0000
\r
74 Use Mail-Followup-To header to determine recipients according to
\r
75 http://cr.yp.to/proto/replyto.html if configured and present in the
\r
76 message being replied to.
\r
78 notmuch-reply.c | 25 +++++++++++++++++++++++--
\r
79 1 file changed, 23 insertions(+), 2 deletions(-)
\r
81 diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
82 index 22c58ff..604691a 100644
\r
83 --- a/notmuch-reply.c
\r
84 +++ b/notmuch-reply.c
\r
85 @@ -324,6 +324,7 @@ add_recipients_from_message (GMimeMessage *reply,
\r
86 { "bcc", NULL, GMIME_RECIPIENT_TYPE_BCC }
\r
88 const char *from_addr = NULL;
\r
89 + const char *recipients;
\r
93 @@ -343,9 +344,29 @@ add_recipients_from_message (GMimeMessage *reply,
\r
94 reply_to_map[0].fallback = NULL;
\r
97 - for (i = 0; i < ARRAY_SIZE (reply_to_map); i++) {
\r
98 - const char *recipients;
\r
99 + /* Use Mail-Followup-To header to determine recipients according
\r
100 + * to http://cr.yp.to/proto/replyto.html if configured and present
\r
101 + * in the message being replied to.
\r
103 + if (reply_all && notmuch_config_get_reply_honor_followup_to (config)) {
\r
104 + recipients = notmuch_message_get_header (message, "mail-followup-to");
\r
105 + if (recipients && *recipients) {
\r
106 + n = scan_address_string (recipients, config, reply,
\r
107 + GMIME_RECIPIENT_TYPE_TO, &from_addr);
\r
109 + /* Same rationale as in the loop below. */
\r
112 + /* From address and some recipients are enough, bail out. */
\r
114 + return from_addr;
\r
116 + /* Else need to find from address in other headers. */
\r
121 + for (i = 0; i < ARRAY_SIZE (reply_to_map); i++) {
\r
122 recipients = notmuch_message_get_header (message,
\r
123 reply_to_map[i].header);
\r
124 if ((recipients == NULL || recipients[0] == '\0') && reply_to_map[i].fallback)
\r