notmuch-mutt: support for messages that lack Message-ID (v2)
authorStefano Zacchiroli <zack@upsilon.cc>
Mon, 9 Feb 2015 09:41:28 +0000 (10:41 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:48:01 +0000 (14:48 -0700)
ed/7ee43606697b36c390b2c391a03ce8b9d1c367 [new file with mode: 0644]

diff --git a/ed/7ee43606697b36c390b2c391a03ce8b9d1c367 b/ed/7ee43606697b36c390b2c391a03ce8b9d1c367
new file mode 100644 (file)
index 0000000..85df340
--- /dev/null
@@ -0,0 +1,74 @@
+Return-Path: <zack@upsilon.cc>\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 CB888431FD2\r
+       for <notmuch@notmuchmail.org>; Mon,  9 Feb 2015 01:41:43 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.338\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.338 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       DNS_FROM_AHBL_RHSBL=2.438] 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 dnotUR8KEiWO for <notmuch@notmuchmail.org>;\r
+       Mon,  9 Feb 2015 01:41:40 -0800 (PST)\r
+Received: from upsilon.cc (upsilon.cc [178.32.142.91])\r
+       by olra.theworths.org (Postfix) with ESMTP id E98D9431FC4\r
+       for <notmuch@notmuchmail.org>; Mon,  9 Feb 2015 01:41:39 -0800 (PST)\r
+Received: from timira.takhisis.invalid (maths.r-prg.net.univ-paris7.fr\r
+       [81.194.27.158]) by upsilon.cc (Postfix) with ESMTPSA id D01EE10E51;\r
+       Mon,  9 Feb 2015 10:41:34 +0100 (CET)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upsilon.cc; s=mail;\r
+       t=1423474894; bh=YIHNS6Z50tKWMS/PxF5M/yW1TMwcsXwOSrK6/Yi8sWY=;\r
+       h=From:To:Cc:Subject:Date:From;\r
+       b=hCDUnPBcEvIrbmY/COQyK05Wpp3qsyUhcUkr36WV1Lrh0OH0V9ImPSsA2fMSWMIGB\r
+       fMY5vBj6z9bGp1Nzd1ExNceDolKFi5eYXJZdA3Q0yr2my0uYZLKWwP9E1G6Dy6OmTL\r
+       5KK5TG+3GKFlZtYHIYNlfJJ3emqp+KrzmU4LJZOY=\r
+Received: by timira.takhisis.invalid (Postfix, from userid 1000)\r
+       id 5C8D9600E1; Mon,  9 Feb 2015 10:41:34 +0100 (CET)\r
+From: Stefano Zacchiroli <zack@upsilon.cc>\r
+To: notmuch@notmuchmail.org\r
+Subject: notmuch-mutt: support for messages that lack Message-ID (v2)\r
+Date: Mon,  9 Feb 2015 10:41:28 +0100\r
+Message-Id: <1423474890-16972-1-git-send-email-zack@upsilon.cc>\r
+X-Mailer: git-send-email 2.1.4\r
+Cc: zack@upsilon.cc\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, 09 Feb 2015 09:41:44 -0000\r
+\r
+Heya, please find attached the second take on adding support for\r
+messages that lack Message-ID to notmuch-mutt. For context see\r
+http://notmuchmail.org/pipermail/notmuch/2015/thread.html#20079\r
+\r
+In this new verison of the patch we start computing the SHA1\r
+incrementally, in case no Message-ID will be found. As soon as the\r
+header is over we parse it (using Mail::Header, to properly handle\r
+line breaks). If a Message-ID is found, it is retourned and SHA1\r
+computation on the rest of the message is aborted. If no Message-ID is\r
+found, SHA1 computation continues, and is used in the end to\r
+synthesize a fake Message-ID in the same way that notmuch itself would\r
+to.\r
+\r
+Note that, contrary to the previous version, no changes of the Debian\r
+packaging are needed this time: Mail::Header is contained in the same\r
+package of Mail::Internet that notmuch-mutt was already using, and\r
+Digest::SHA is shipped with Perl itself.\r
+\r
+Please consider applying this patch to notmuch's master branch.\r
+\r
+Cheers.\r
+\r