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