[PATCH v2 11/14] cli/reply: return internet address list from get header funcs
[notmuch-archives.git] / f9 / cd592bfaa2df6a852f15892be809298fe2ecf3
1 Return-Path: <guyzmo@vilya.m0g.net>\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 828E5431FCF\r
6         for <notmuch@notmuchmail.org>; Mon, 16 Mar 2015 04:18:41 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.438\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 Asu2Ef-Fzonn for <notmuch@notmuchmail.org>;\r
16         Mon, 16 Mar 2015 04:18:38 -0700 (PDT)\r
17 Received: from mail.m0g.net (vilya.m0g.net [195.154.74.47])\r
18         by olra.theworths.org (Postfix) with ESMTP id 3E2A5431FB6\r
19         for <notmuch@notmuchmail.org>; Mon, 16 Mar 2015 04:18:38 -0700 (PDT)\r
20 Received: from localhost (localhost [127.0.0.1])\r
21         by mail.m0g.net (Postfix) with ESMTP id DF2403E536C;\r
22         Mon, 16 Mar 2015 12:18:35 +0100 (CET)\r
23 X-Virus-Scanned: Debian amavisd-new at vilya.m0g.net\r
24 Received: from mail.m0g.net ([127.0.0.1])\r
25         by localhost (sd-38500.dedibox.fr [127.0.0.1]) (amavisd-new, port 10024)\r
26         with ESMTP id QYccPse6qP7j; Mon, 16 Mar 2015 12:18:34 +0100 (CET)\r
27 Received: by mail.m0g.net (Postfix, from userid 1000)\r
28         id 0CB543E536E; Mon, 16 Mar 2015 12:18:33 +0100 (CET)\r
29 Date: Mon, 16 Mar 2015 12:18:30 +0100\r
30 From: Guyzmo <guyzmo+notmuch@m0g.net>\r
31 To: Harlan Lieberman-Berg <hlieberman@setec.io>\r
32 Subject: Re: Proposal: List-Id\r
33 Message-ID: <20150316111830.GJ27498@vilya.online.net>\r
34 References: <87wq2huan3.fsf@setec.io>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain; charset=us-ascii\r
37 Content-Disposition: inline\r
38 In-Reply-To: <87wq2huan3.fsf@setec.io>\r
39 User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12)\r
40 Cc: notmuch@notmuchmail.org\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Mon, 16 Mar 2015 11:18:41 -0000\r
54 \r
55 Hi Harlan,\r
56 \r
57 On Sun, Mar 15, 2015 at 07:02:56PM -0400, Harlan Lieberman-Berg wrote:\r
58 > One of my (few) problems right now with notmuch is around mailing lists\r
59 > that are copied, either as CC or BCC, on various emails that go around.\r
60 > My filtering inside notmuch right now doesn't catch all the messages,\r
61 > since the only tag I can match on is "to:foo@bar.org" and not all\r
62 > messages have the to rewritten.\r
63 \r
64 I'm not sure to correctly understand your issue. You're talking about\r
65 looking up all mails that are of a given mailing list?\r
66 \r
67 Then I'm not sure it needs notmuch to be patched, as this can be added\r
68 pretty easily using an incoming mail filter. I'm personally using\r
69 procmail, so it'd be one such as:\r
70 \r
71     :0:notmuch.lock\r
72     * ^List-[Ii][dD]:.*\r
73     {\r
74     TAGS="${TAGS} +ml -inbox"\r
75     }\r
76 \r
77 To have the inbox tag removed and the ml tag added.\r
78 \r
79 Then I tend to use the right hand side of the `+` on incoming mail, so\r
80 that I can choose a unique tag for my mail filtering upon subscription\r
81 to the mailing list:\r
82 \r
83     :0:notmuch.lock\r
84     * ^TO\/guyzmo\+[a-z0-9]+@m0g\.net\r
85     * MATCH ?? ^guyzmo\+\/[a-z0-9]+\r
86     {\r
87     TAGS="+${MATCH}"\r
88     }\r
89 \r
90 As an example, just look my From header here ;-)\r
91 \r
92 > The standard for identifying mailing lists seems to be List-Id, as per\r
93 > RFC 2919.  I can understand the desire to keep the number of headers\r
94 > included in the header block low, but I wonder if this might be a common\r
95 > enough use-case to suggest its inclusion.\r
96 > As a counter-argument, I can see the parallel to spam filtering which\r
97 > come with their own set of headers that are not special cased by\r
98 > notmuch, but there seems to be much more variety in headers there - as\r
99 > well as different user configurations.\r
100 \r
101 One issue I can see for indexing `List-Id` is that even though there's\r
102 an RFC for that, the value given can be either a `name <mail>`, a\r
103 `mail` or a `name` field. There's no real rule and the content can\r
104 sometimes be quite unreliable when it comes to index search.\r
105 \r
106 I believe that this discussion has happened in the past, and IIRC, the\r
107 output that it was not to be integrated.\r
108 \r
109 HTH,\r
110 \r
111 -- \r
112 Guyzmo\r