Re: Automatic suppression of non-duplicate messages
authorJani Nikula <jani@nikula.org>
Sun, 4 Nov 2012 22:34:40 +0000 (00:34 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:18 +0000 (09:50 -0800)
16/cac9674f0c93dcd9f146f02ac9d9354791bc71 [new file with mode: 0644]

diff --git a/16/cac9674f0c93dcd9f146f02ac9d9354791bc71 b/16/cac9674f0c93dcd9f146f02ac9d9354791bc71
new file mode 100644 (file)
index 0000000..07e61f3
--- /dev/null
@@ -0,0 +1,106 @@
+Return-Path: <jani@nikula.org>\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 0E70B431FAF\r
+       for <notmuch@notmuchmail.org>; Sun,  4 Nov 2012 14:34:46 -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 FNhWQGK48vUg for <notmuch@notmuchmail.org>;\r
+       Sun,  4 Nov 2012 14:34:45 -0800 (PST)\r
+Received: from mail-la0-f53.google.com (mail-la0-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 3E275431FAE\r
+       for <notmuch@notmuchmail.org>; Sun,  4 Nov 2012 14:34:45 -0800 (PST)\r
+Received: by mail-la0-f53.google.com with SMTP id l5so4055251lah.26\r
+       for <notmuch@notmuchmail.org>; Sun, 04 Nov 2012 14:34:43 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+       :mime-version:content-type:x-gm-message-state;\r
+       bh=rvj1zVYGT8ukw4NUhaiYyBE/VMYkkVUEG0cElHKvth0=;\r
+       b=huK+vJNakhJOhbZgJ/bx7EzMqlpzFrUhh4SsGQ9bCJ8ml56Y750RCAU1B/E69fep6P\r
+       XVEHxILgELYQSS/IMLSZXIRAx70ydd5xwMQRvEhfpWBWhaBVs1tQv1HZp7n5OrXg0gHP\r
+       VKXrmFV6KY0SMEb7BZpRG3ca+dlpwlsFSRLPAUn8e5P2USw8d61AY8QvUoiCwHZp+uHD\r
+       7HYMmX5eReicmimy7asAqN2wTWI/ZaQQ035OF7ov86/DFn77ExG/jKKiIp5zQM2vJmxG\r
+       1JPhkaMam9sUZv3if1kuVjhZSgk7giiJcob0HJZY3OYw9P7nIMbKFjTZkMM23sfKzjrr\r
+       diWg==\r
+Received: by 10.152.106.79 with SMTP id gs15mr7545417lab.31.1352068483774;\r
+       Sun, 04 Nov 2012 14:34:43 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id sj3sm5033777lab.2.2012.11.04.14.34.42\r
+       (version=SSLv3 cipher=OTHER); Sun, 04 Nov 2012 14:34:43 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>,\r
+       Eirik Byrkjeflot Anonsen <eirik@eirikba.org>, notmuch@notmuchmail.org\r
+Subject: Re: Automatic suppression of non-duplicate messages\r
+In-Reply-To: <87390qxvb4.fsf@maritornes.cs.unb.ca>\r
+References: <87mwyz3s9d.fsf@star.eba> <87390qxvb4.fsf@maritornes.cs.unb.ca>\r
+User-Agent: Notmuch/0.14+81~g1924356 (http://notmuchmail.org) Emacs/23.4.1\r
+       (i686-pc-linux-gnu)\r
+Date: Mon, 05 Nov 2012 00:34:40 +0200\r
+Message-ID: <87390pf14v.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQl48JG7cyaDBq1jTBqLU3DIygRcl6khW54JeAuRMFoXOgf5yh9PIJxQyNBuHhwPdyyXanIZ\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: Sun, 04 Nov 2012 22:34:46 -0000\r
+\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
+\r
+BR,\r
+Jani.\r