Re: Hi all
[notmuch-archives.git] / 03 / 5a2352a27964769248e03d73b8308397689b95
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 C103C431FBC\r
6         for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:31 -0700 (PDT)\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
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \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 Aia0+NjQfwpL for <notmuch@notmuchmail.org>;\r
17         Wed, 16 Oct 2013 12:00:27 -0700 (PDT)\r
18 Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com\r
19  [74.125.83.47])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  059EB431FB6    for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:25 -0700\r
22  (PDT)\r
23 Received: by mail-ee0-f47.google.com with SMTP id d49so580083eek.6\r
24         for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:24 -0700 (PDT)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=1e100.net; s=20130820;\r
27         h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
28         :references:in-reply-to:references;\r
29         bh=mJ/sNzkxRyvvK7xDQmKkzIs57yiqR2k77GY/rkLdWB0=;\r
30         b=ar1UTaMhyr9vmJpIlKlXVS+vKfCcRoa2hj1YVW9lHLew7xgRwio0Ri1k81qm78McQ6\r
31         lq1yEXM/Jj8iSdSEn4qkO48FXNImXRVz31INKr8H/idp95nBpHwlOmFh0sXqtUAHn3MS\r
32         UYfDX94nFDf5ms2SCZsvBcO/pW/FSJx2St0hwaAkZDehQknyrVf1lF0zpN/Thn6e16WW\r
33         TMAavgnAKeHb/VdRptvYpW4zo8jg4aKdSbwId9yd7Y5juM1idTEbE+PQqsXsmJDP01ic\r
34         6SoheCUmC/SI6YY2aR9OeWzP8VkFbhav/ElFNXsa/nO2K/MhOkWijg1BoveuKCrk+qOZ\r
35         TtyQ==\r
36 X-Gm-Message-State:\r
37  ALoCoQmd8zSnQSGD1n87iW/iIRroLZjsmXebFpiQ4RuCluEg3xLOZx99XY+9vVegS44QjfvLZAmg\r
38 X-Received: by 10.14.42.6 with SMTP id i6mr5709773eeb.65.1381950024909;\r
39         Wed, 16 Oct 2013 12:00:24 -0700 (PDT)\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
41         [88.195.111.91]) by mx.google.com with ESMTPSA id\r
42         x47sm183065259eea.16.1969.12.31.16.00.00\r
43         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
44         Wed, 16 Oct 2013 12:00:24 -0700 (PDT)\r
45 From: Jani Nikula <jani@nikula.org>\r
46 To: notmuch@notmuchmail.org\r
47 Subject: [PATCH 3/6] cli: make the hacky from guessing more liberal\r
48 Date: Wed, 16 Oct 2013 22:00:10 +0300\r
49 Message-Id:\r
50  <7dd03cd9c1677be8c5937d11b376d4cbd26c64f5.1381948853.git.jani@nikula.org>\r
51 X-Mailer: git-send-email 1.8.4.rc3\r
52 In-Reply-To: <cover.1381948853.git.jani@nikula.org>\r
53 References: <cover.1381948853.git.jani@nikula.org>\r
54 In-Reply-To: <cover.1381948853.git.jani@nikula.org>\r
55 References: <cover.1381948853.git.jani@nikula.org>\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Wed, 16 Oct 2013 19:00:32 -0000\r
69 \r
70 This is in preparation of switching to gmime header parsing. Accept\r
71 "for" and "by" preceded by tabs in the received header. This is a bit\r
72 flaky, but so is the whole guessing code.\r
73 ---\r
74  notmuch-reply.c | 4 ++--\r
75  1 file changed, 2 insertions(+), 2 deletions(-)\r
76 \r
77 diff --git a/notmuch-reply.c b/notmuch-reply.c\r
78 index 9d6f843..4b67e66 100644\r
79 --- a/notmuch-reply.c\r
80 +++ b/notmuch-reply.c\r
81 @@ -423,7 +423,7 @@ guess_from_received_header (notmuch_config_t *config, notmuch_message_t *message\r
82      /* First we look for a " for <email@add.res>" in the received\r
83       * header\r
84       */\r
85 -    ptr = strstr (received, " for ");\r
86 +    ptr = strstr (received, "for ");\r
87  \r
88      /* Note: ptr potentially contains a list of email addresses. */\r
89      addr = user_address_in_string (ptr, config);\r
90 @@ -440,7 +440,7 @@ guess_from_received_header (notmuch_config_t *config, notmuch_message_t *message\r
91       * system in this step of the receive chain\r
92       */\r
93      by = received;\r
94 -    while((by = strstr (by, " by ")) != NULL) {\r
95 +    while((by = strstr (by, "by ")) != NULL) {\r
96         by += 4;\r
97         if (*by == '\0')\r
98             break;\r
99 -- \r
100 1.8.4.rc3\r
101 \r