--- /dev/null
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id D671A431FAF\r
+ for <notmuch@notmuchmail.org>; Sun, 4 Nov 2012 20:28:18 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id OaNKv9qAUY3m for <notmuch@notmuchmail.org>;\r
+ Sun, 4 Nov 2012 20:28:18 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+ [18.7.68.36])\r
+ by olra.theworths.org (Postfix) with ESMTP id 21336431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 4 Nov 2012 20:28:18 -0800 (PST)\r
+X-AuditID: 12074424-b7fce6d000000925-17-50974060829e\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+ by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 8D.4A.02341.06047905; Sun, 4 Nov 2012 23:28:16 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id qA54SFdC020876; \r
+ Sun, 4 Nov 2012 23:28:16 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+ (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qA54SCp2029786\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Sun, 4 Nov 2012 23:28:14 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1TVEIG-0005QM-NN; Sun, 04 Nov 2012 23:28:12 -0500\r
+Date: Sun, 4 Nov 2012 23:28:12 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jani Nikula <jani@nikula.org>\r
+Subject: Re: Automatic suppression of non-duplicate messages\r
+Message-ID: <20121105042749.GT15377@mit.edu>\r
+References: <87mwyz3s9d.fsf@star.eba> <87390qxvb4.fsf@maritornes.cs.unb.ca>\r
+ <87390pf14v.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87390pf14v.fsf@nikula.org>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprGKsWRmVeSWpSXmKPExsUixCmqrZvoMD3AYN5NAYsbrd2MFitvXGS0\r
+ aJrubHH95kxmBxaPPYs6mD1u3X/N7vFs1S1mjy2H3jMHsERx2aSk5mSWpRbp2yVwZexqeMRc\r
+ cE+w4sGrpYwNjFP4uhg5OSQETCTOzZjBCmGLSVy4t56ti5GLQ0hgH6PE0W1LwRJCAusZJWYt\r
+ dYFInGCSeLdsCTuEs4RRYu/lTiaQKhYBFYmzO/eyg9hsAhoS2/YvZwSxRQQUJTaf3A9mMwuU\r
+ Srzc2Q1WLyxgI3F+/1WwDbwCOhLHN51ih9iWLXH78W+ouKDEyZlPWCB6tSRu/HsJ1MsBZEtL\r
+ LP/HARLmBFp15P8PNhBbFOiEKSe3sU1gFJqFpHsWku5ZCN0LGJlXMcqm5Fbp5iZm5hSnJusW\r
+ Jyfm5aUW6Zrr5WaW6KWmlG5iBAU/u4vKDsbmQ0qHGAU4GJV4eD9ITA8QYk0sK67MPcQoycGk\r
+ JMrLYQsU4kvKT6nMSCzOiC8qzUktPsQowcGsJMLLwQCU401JrKxKLcqHSUlzsCiJ815Puekv\r
+ JJCeWJKanZpakFoEk5Xh4FCS4NW1B2oULEpNT61Iy8wpQUgzcXCCDOcBGu4KUsNbXJCYW5yZ\r
+ DpE/xagoJc4rAZIQAElklObB9cKS0ytGcaBXhHl9Qap4gIkNrvsV0GAmoMHbL00BGVySiJCS\r
+ amDcknVvxpXpPxa4rJBYfe5URNtpnRlrmxqKWOP0DxksfBIja8/m1So6yY0lneHkXc4pQjsy\r
+ L5x7efL9F4Z32yYy8fk7Tvj/r13jgTDvnI9zHXZnOcjZndB+pxjG4CXJdnFuxSnmUveQzn+9\r
+ R28f6zmt9qlfnsHjtO+bU71v5Nr2xafneyWHqkxVYinOSDTUYi4qTgQAMGXJrSkDAAA=\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 05 Nov 2012 04:28:19 -0000\r
+\r
+Quoth Jani Nikula on Nov 05 at 12:34 am:\r
+> On Sat, 03 Nov 2012, David Bremner <david@tethera.net> wrote:\r
+> > Eirik Byrkjeflot Anonsen <eirik@eirikba.org> writes:\r
+> >\r
+> >> That's not what I see. If I search for a term that only appears in\r
+> >> one of the "copies", none of the copies are included in the search\r
+> >> result.\r
+> >\r
+> > The offending code is at line 1813 of lib/database.cc; the message is\r
+> > only indexed if the message-id is new.\r
+> >\r
+> > It might be sensible to move _notmuch_message_index_file into the other\r
+> > branch of the if, but even if that works fine, something more\r
+> > sophisticated is needed for the call to\r
+> > __notmuch_message_set_header_values; the invariant that each message has\r
+> > a single subject seems reasonable.\r
+> >\r
+> > Offhand I'm not sure of a good method of automatically deciding what is\r
+> > the same message (with e.g. headers and footer text added by a mailing\r
+> > list).\r
+> \r
+> Assuming there was good method, what would you do with two different\r
+> messages that have the same message id? That is the unique id we use to\r
+> identify messages (which should be fine per RFC 5322 and its\r
+> predecessors; we're talking about messages from broken systems here).\r
+> \r
+> It might be helpful to have a configuration option similar to new.tags\r
+> that would define the tags to be assigned to messages with duplicate\r
+> message ids. (This could be done in the\r
+> NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID case near line 516 of\r
+> notmuch-new.c). This could be used to assign a "dupe" tag, for example,\r
+> so the user could do whatever they want in the post-new hook or the user\r
+> interface. A sufficiently clever post-new hook could compare the files\r
+> of a message, and drop the tag or add another, as the case may\r
+> be. Surely not a perfect solution, but keeps the implementation simple.\r
+\r
+This would also trigger on message flag changes and folder moves\r
+performed outside of notmuch, since notmuch sees those as a duplicate\r
+message ID followed by a deletion. The only way to do something for\r
+every received message even if it has the same message ID as an\r
+existing message is to do it in whatever delivers mail. Currently, we\r
+don't have a good story for integrating on-delivery operations with\r
+notmuch.\r