Re: [PATCH] notmuch-tag: initialize with enum instead of 0.
[notmuch-archives.git] / 6a / 93577c5bb0ade7b823d29bbe61c8cfdb951913
1 Return-Path: <michael.hudson@canonical.com>\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 4B304429E25\r
6         for <notmuch@notmuchmail.org>; Thu,  8 Dec 2011 13:53:11 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id b75SsWvGul7G for <notmuch@notmuchmail.org>;\r
16         Thu,  8 Dec 2011 13:53:10 -0800 (PST)\r
17 Received: from youngberry.canonical.com (youngberry.canonical.com\r
18         [91.189.89.112])\r
19         by olra.theworths.org (Postfix) with ESMTP id AE2CF431FD0\r
20         for <notmuch@notmuchmail.org>; Thu,  8 Dec 2011 13:53:10 -0800 (PST)\r
21 Received: from [120.136.5.22] (helo=narsil)\r
22         by youngberry.canonical.com with esmtpsa\r
23         (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71)\r
24         (envelope-from <michael.hudson@canonical.com>) id 1RYltt-00039G-Al\r
25         for notmuch@notmuchmail.org; Thu, 08 Dec 2011 21:53:09 +0000\r
26 Received: by narsil (Postfix, from userid 1000)\r
27         id DE40852054C; Fri,  9 Dec 2011 10:53:04 +1300 (NZDT)\r
28 From: Michael Hudson-Doyle <michael.hudson@canonical.com>\r
29 To: notmuch@notmuchmail.org\r
30 Subject: notmuch reply From:-guessing heuristics\r
31 User-Agent: Notmuch/0.10.1 (http://notmuchmail.org) Emacs/23.3.1\r
32         (x86_64-pc-linux-gnu)\r
33 Date: Fri, 09 Dec 2011 10:53:04 +1300\r
34 Message-ID: <8762hq7mtb.fsf@canonical.com>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain; charset=us-ascii\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Thu, 08 Dec 2011 21:53:11 -0000\r
50 \r
51 Hi all,\r
52 \r
53 I have a specific example where "notmuch reply" does not set a useful\r
54 from: header.  The set is:\r
55 \r
56 1) I have a google apps-for-your-domain address,\r
57    michael.hudson@linaro.org\r
58 \r
59 2) There is a group/alias, validation@linaro.org that only accepts mail\r
60    from members\r
61 \r
62 3) michael.hudson@linaro.org forwards to michael.hudson@canonical.com,\r
63    from where I get email with offlineimap.\r
64 \r
65 4) michael.hudson@linaro.org and michael.hudson@canonical.com are both\r
66    configured as addresses in ~/.notmuch-config with the linaro.org\r
67    address being primary.\r
68 \r
69 When I reply to a mail to validation@linaro.org, the guessed address is\r
70 michael.hudson@canonical.com and unless I change it, the reply bounces,\r
71 which is obviously a bit annoying.\r
72 \r
73 Looking at the headers (and the notmuch source),\r
74 michael.hudson@canonical.com seems to be being found in the Received\r
75 headers.  michael.hudson@linaro.org is not in any Received header, which\r
76 is a bit strange, but in any case I think the code would find\r
77 michael.hudson@canonical.com first (would it perhaps make more sense to\r
78 search backwards through received?  An earlier header is probably closer\r
79 to what was intended, in some sense).\r
80 \r
81 michael.hudson@linaro.org does appear in a Delivered-To: header, so\r
82 maybe those could be considered (it seems that some MTAs add a\r
83 Delivered-To header from the envelope address, so it would have some\r
84 legitimacy)?  It would work in this case, but only because the\r
85 Delivered-To that the canonical.com MTA adds is an internal address\r
86 that's not configured as an address for me in notmuch...\r
87 \r
88 Alternatively, *I* wouldn't mind if notmuch stopped trying at all hard,\r
89 and just used the primary address if there was nothing matching in\r
90 to:/cc: but I guess that wouldn't work on mailing lists at all...\r
91 \r
92 Hm, I guess I've argued myself around to thinking that considering\r
93 Delivered-To as a source of potential from addresses would be an\r
94 improvement.  What do you guys think?\r
95 \r
96 Cheers,\r
97 mwh\r