--- /dev/null
+Return-Path: <david@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id B1C156DE17E3\r
+ for <notmuch@notmuchmail.org>; Sat, 27 Feb 2016 05:14:49 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.036\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.036 tagged_above=-999 required=5\r
+ tests=[AWL=-0.025, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id c0SvlHGR4cxy for <notmuch@notmuchmail.org>;\r
+ Sat, 27 Feb 2016 05:14:47 -0800 (PST)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 16F816DE12E8\r
+ for <notmuch@notmuchmail.org>; Sat, 27 Feb 2016 05:14:47 -0800 (PST)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1aZeiU-0006kF-Ky; Sat, 27 Feb 2016 08:15:26 -0500\r
+Received: (nullmailer pid 3361 invoked by uid 1000);\r
+ Sat, 27 Feb 2016 13:14:44 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
+ Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH v3 08/16] reorganize indexing of multipart/signed and\r
+ multipart/encrypted\r
+In-Reply-To: <1454272801-23623-9-git-send-email-dkg@fifthhorseman.net>\r
+References: <1454272801-23623-1-git-send-email-dkg@fifthhorseman.net>\r
+ <1454272801-23623-9-git-send-email-dkg@fifthhorseman.net>\r
+User-Agent: Notmuch/0.21+26~g9404723 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sat, 27 Feb 2016 09:14:44 -0400\r
+Message-ID: <871t7y5m7v.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 27 Feb 2016 13:14:49 -0000\r
+\r
+Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\r
+\r
+> This prepares the codebase for a cleaner changeset for dealing with\r
+> indexing some encrypted messages in the clear.\r
+> ---\r
+> lib/index.cc | 39 +++++++++++++++++++--------------------\r
+> 1 file changed, 19 insertions(+), 20 deletions(-)\r
+>\r
+> diff --git a/lib/index.cc b/lib/index.cc\r
+> index f166aef..ab0fd78 100644\r
+> --- a/lib/index.cc\r
+> +++ b/lib/index.cc\r
+> @@ -333,27 +333,26 @@ _index_mime_part (notmuch_message_t *message,\r
+> GMimeMultipart *multipart = GMIME_MULTIPART (part);\r
+> int i;\r
+> \r
+> - if (GMIME_IS_MULTIPART_SIGNED (multipart))\r
+> - _notmuch_message_add_term (message, "tag", "signed");\r
+> -\r
+> - if (GMIME_IS_MULTIPART_ENCRYPTED (multipart))\r
+> - _notmuch_message_add_term (message, "tag", "encrypted");\r
+> -\r
+> - for (i = 0; i < g_mime_multipart_get_count (multipart); i++) {\r
+> - if (GMIME_IS_MULTIPART_SIGNED (multipart)) {\r
+> - /* Don't index the signature. */\r
+> - if (i == 1)\r
+> - continue;\r
+> - if (i > 1)\r
+> - _notmuch_database_log (_notmuch_message_database (message),\r
+> - "Warning: Unexpected extra parts of multipart/signed. Indexing anyway.\n");\r
+> - }\r
+> - if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) {\r
+> - /* Don't index encrypted parts. */\r
+> - continue;\r
+> - }\r
+> + if (GMIME_IS_MULTIPART_SIGNED (multipart)) {\r
+> + _notmuch_message_add_term (message, "tag", "signed");\r
+> + /* FIXME: should we try to validate the signature? */\r
+> + \r
+> + /* FIXME: is it always just the first part that is signed in\r
+> + all multipart/signed messages?*/\r
+> _index_mime_part (message,\r
+> - g_mime_multipart_get_part (multipart, i));\r
+> + g_mime_multipart_get_part (multipart, 0));\r
+\r
+It took me a long moment to understand the change from "index part if not 1"\r
+to "index part 0". If that deserved explanation (which I'm not so certain\r
+about), it would be in the commit message.\r