[PATCH 06/10] cli: Introduce "notmuch address" command
[notmuch-archives.git] / 3e / 229ccd9afdd247aca7b42d6bb23049a822d73b
1 Return-Path: <amdragon@mit.edu>\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 D671A431FAF\r
6         for <notmuch@notmuchmail.org>; Sun,  4 Nov 2012 20:28:18 -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 OaNKv9qAUY3m for <notmuch@notmuchmail.org>;\r
16         Sun,  4 Nov 2012 20:28:18 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
18         [18.7.68.36])\r
19         by olra.theworths.org (Postfix) with ESMTP id 21336431FAE\r
20         for <notmuch@notmuchmail.org>; Sun,  4 Nov 2012 20:28:18 -0800 (PST)\r
21 X-AuditID: 12074424-b7fce6d000000925-17-50974060829e\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 8D.4A.02341.06047905; Sun,  4 Nov 2012 23:28:16 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id qA54SFdC020876; \r
27         Sun, 4 Nov 2012 23:28:16 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qA54SCp2029786\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Sun, 4 Nov 2012 23:28:14 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1TVEIG-0005QM-NN; Sun, 04 Nov 2012 23:28:12 -0500\r
37 Date: Sun, 4 Nov 2012 23:28:12 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Jani Nikula <jani@nikula.org>\r
40 Subject: Re: Automatic suppression of non-duplicate messages\r
41 Message-ID: <20121105042749.GT15377@mit.edu>\r
42 References: <87mwyz3s9d.fsf@star.eba> <87390qxvb4.fsf@maritornes.cs.unb.ca>\r
43         <87390pf14v.fsf@nikula.org>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 Content-Disposition: inline\r
47 In-Reply-To: <87390pf14v.fsf@nikula.org>\r
48 User-Agent: Mutt/1.5.21 (2010-09-15)\r
49 X-Brightmail-Tracker:\r
50  H4sIAAAAAAAAA+NgFprGKsWRmVeSWpSXmKPExsUixCmqrZvoMD3AYN5NAYsbrd2MFitvXGS0\r
51         aJrubHH95kxmBxaPPYs6mD1u3X/N7vFs1S1mjy2H3jMHsERx2aSk5mSWpRbp2yVwZexqeMRc\r
52         cE+w4sGrpYwNjFP4uhg5OSQETCTOzZjBCmGLSVy4t56ti5GLQ0hgH6PE0W1LwRJCAusZJWYt\r
53         dYFInGCSeLdsCTuEs4RRYu/lTiaQKhYBFYmzO/eyg9hsAhoS2/YvZwSxRQQUJTaf3A9mMwuU\r
54         Srzc2Q1WLyxgI3F+/1WwDbwCOhLHN51ih9iWLXH78W+ouKDEyZlPWCB6tSRu/HsJ1MsBZEtL\r
55         LP/HARLmBFp15P8PNhBbFOiEKSe3sU1gFJqFpHsWku5ZCN0LGJlXMcqm5Fbp5iZm5hSnJusW\r
56         Jyfm5aUW6Zrr5WaW6KWmlG5iBAU/u4vKDsbmQ0qHGAU4GJV4eD9ITA8QYk0sK67MPcQoycGk\r
57         JMrLYQsU4kvKT6nMSCzOiC8qzUktPsQowcGsJMLLwQCU401JrKxKLcqHSUlzsCiJ815Puekv\r
58         JJCeWJKanZpakFoEk5Xh4FCS4NW1B2oULEpNT61Iy8wpQUgzcXCCDOcBGu4KUsNbXJCYW5yZ\r
59         DpE/xagoJc4rAZIQAElklObB9cKS0ytGcaBXhHl9Qap4gIkNrvsV0GAmoMHbL00BGVySiJCS\r
60         amDcknVvxpXpPxa4rJBYfe5URNtpnRlrmxqKWOP0DxksfBIja8/m1So6yY0lneHkXc4pQjsy\r
61         L5x7efL9F4Z32yYy8fk7Tvj/r13jgTDvnI9zHXZnOcjZndB+pxjG4CXJdnFuxSnmUveQzn+9\r
62         R28f6zmt9qlfnsHjtO+bU71v5Nr2xafneyWHqkxVYinOSDTUYi4qTgQAMGXJrSkDAAA=\r
63 Cc: notmuch@notmuchmail.org\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Mon, 05 Nov 2012 04:28:19 -0000\r
77 \r
78 Quoth Jani Nikula on Nov 05 at 12:34 am:\r
79 > On Sat, 03 Nov 2012, David Bremner <david@tethera.net> wrote:\r
80 > > Eirik Byrkjeflot Anonsen <eirik@eirikba.org> writes:\r
81 > >\r
82 > >> That's not what I see.  If I search for a term that only appears in\r
83 > >> one of the "copies", none of the copies are included in the search\r
84 > >> result.\r
85 > >\r
86 > > The offending code is at line 1813 of lib/database.cc; the message is\r
87 > > only indexed if the message-id is new.\r
88 > >\r
89 > > It might be sensible to move _notmuch_message_index_file into the other\r
90 > > branch of the if, but even if that works fine, something more\r
91 > > sophisticated is needed for the call to\r
92 > > __notmuch_message_set_header_values; the invariant that each message has\r
93 > > a single subject seems reasonable.\r
94 > >\r
95 > > Offhand I'm not sure of a good method of automatically deciding what is\r
96 > > the same message (with e.g. headers and footer text added by a mailing\r
97 > > list).\r
98\r
99 > Assuming there was good method, what would you do with two different\r
100 > messages that have the same message id? That is the unique id we use to\r
101 > identify messages (which should be fine per RFC 5322 and its\r
102 > predecessors; we're talking about messages from broken systems here).\r
103\r
104 > It might be helpful to have a configuration option similar to new.tags\r
105 > that would define the tags to be assigned to messages with duplicate\r
106 > message ids. (This could be done in the\r
107 > NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID case near line 516 of\r
108 > notmuch-new.c). This could be used to assign a "dupe" tag, for example,\r
109 > so the user could do whatever they want in the post-new hook or the user\r
110 > interface. A sufficiently clever post-new hook could compare the files\r
111 > of a message, and drop the tag or add another, as the case may\r
112 > be. Surely not a perfect solution, but keeps the implementation simple.\r
113 \r
114 This would also trigger on message flag changes and folder moves\r
115 performed outside of notmuch, since notmuch sees those as a duplicate\r
116 message ID followed by a deletion.  The only way to do something for\r
117 every received message even if it has the same message ID as an\r
118 existing message is to do it in whatever delivers mail.  Currently, we\r
119 don't have a good story for integrating on-delivery operations with\r
120 notmuch.\r