Re: [PATCH v4 5/6] cli: search: Add configurable way to filter out duplicate addresses
authorMark Walters <markwalters1009@gmail.com>
Thu, 30 Oct 2014 09:00:13 +0000 (09:00 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:05:53 +0000 (10:05 -0800)
b3/0279c109cff97f7726618d85bcfa2874401261 [new file with mode: 0644]

diff --git a/b3/0279c109cff97f7726618d85bcfa2874401261 b/b3/0279c109cff97f7726618d85bcfa2874401261
new file mode 100644 (file)
index 0000000..38de089
--- /dev/null
@@ -0,0 +1,116 @@
+Return-Path: <m.walters@qmul.ac.uk>\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 1F9AE431FC7\r
+       for <notmuch@notmuchmail.org>; Thu, 30 Oct 2014 02:00:46 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 OCE1qIamr9hA for <notmuch@notmuchmail.org>;\r
+       Thu, 30 Oct 2014 02:00:38 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0BEA2431FB6\r
+       for <notmuch@notmuchmail.org>; Thu, 30 Oct 2014 02:00:38 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+       by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1XjlaZ-0002vG-94; Thu, 30 Oct 2014 09:00:35 +0000\r
+Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost)\r
+       by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1XjlaY-0004TR-VY; Thu, 30 Oct 2014 09:00:15 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, Michal Sojka <sojkam1@fel.cvut.cz>,\r
+       notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v4 5/6] cli: search: Add configurable way to\r
+       filter  out     duplicate addresses\r
+In-Reply-To: <m2zjceueg4.fsf@guru.guru-group.fi>\r
+References: <1414421455-3037-1-git-send-email-sojkam1@fel.cvut.cz>\r
+       <1414421455-3037-6-git-send-email-sojkam1@fel.cvut.cz>\r
+       <87egtqug4t.fsf@qmul.ac.uk> <m2zjceueg4.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 30 Oct 2014 09:00:13 +0000\r
+Message-ID: <87r3xq9bky.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 87.81.223.162\r
+X-QM-Geographic: According to ripencc,\r
+       this message was delivered by a machine in Britain (UK) (GB).\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: a0b2b2c2538659214970f37fd0d3d080 (of first 20000 bytes)\r
+X-SpamAssassin-Score: -0.1\r
+X-SpamAssassin-SpamBar: /\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+       determine if it is\r
+       spam. We require at least 5.0 points to mark a message as spam.\r
+       This message scored -0.1 points.\r
+       Summary of the scoring: \r
+       * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+       provider *      (markwalters1009[at]gmail.com)\r
+       * -0.1 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\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: Thu, 30 Oct 2014 09:00:46 -0000\r
+\r
+On Thu, 30 Oct 2014, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> On Thu, Oct 30 2014, Mark Walters <markwalters1009@gmail.com> wrote:\r
+>\r
+>> On Mon, 27 Oct 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+>>> This adds an algorithm to filter out duplicate addresses from address\r
+>>> outputs (sender, receivers). The algorithm can be configured with\r
+>>> --filter-by command line option.\r
+>>>\r
+>>> The code here is an extended version of a patch from Jani Nikula.\r
+>>\r
+>> Hi\r
+>>\r
+>> As this is getting into the more controversial bike shedding region I\r
+>> wonder if it would be worth splitting this into 2 patches: the first\r
+>> could do the default dedupe based on name/address and the second could\r
+>> do add the filter-by options. \r
+>>\r
+>> I think the default deduping is obviously worth doing but I am not sure\r
+>> about the rest. In any case I think the default deduping could go in\r
+>> pre-freeze but I would recommend the rest is left until after.\r
+>\r
+> I can agree with that, but there is one hard thing to resolve: \r
+> "naming things"(*)\r
+>\r
+> (*) http://martinfowler.com/bliki/TwoHardThings.html\r
+>\r
+> With all rest ignored (sorry no time to work on this in more detail now),\r
+> this default deduping could be done with single argument '--unique'...\r
+\r
+In this case I am suggesting that to start with the default deduping is\r
+unconditionally done and that there is no command line argument. We can\r
+decide on other filter options, possibly including a completely\r
+unfiltered list (*), later.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+(*) Personally I don't really see a use case for the unfiltered list but\r
+others may disagree.\r
+\r