Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
authorDavid Bremner <david@tethera.net>
Sat, 13 Aug 2016 04:30:30 +0000 (13:30 +0900)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:24 +0000 (16:22 -0700)
21/884f93a9d2853d30f5d59ae9b1b4f3840d5f1d [new file with mode: 0644]

diff --git a/21/884f93a9d2853d30f5d59ae9b1b4f3840d5f1d b/21/884f93a9d2853d30f5d59ae9b1b4f3840d5f1d
new file mode 100644 (file)
index 0000000..93f3d72
--- /dev/null
@@ -0,0 +1,73 @@
+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 4C0426DE273E\r
+ for <notmuch@notmuchmail.org>; Fri, 12 Aug 2016 21:31:11 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.007\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004,\r
+  SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 4kBjLtZ4yT9t for <notmuch@notmuchmail.org>;\r
+ Fri, 12 Aug 2016 21:31:03 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 20B516DE273B\r
+ for <notmuch@notmuchmail.org>; Fri, 12 Aug 2016 21:31:03 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1bYQbJ-0005fg-Fr; Sat, 13 Aug 2016 00:31:13 -0400\r
+Received: (nullmailer pid 24334 invoked by uid 1000);\r
+ Sat, 13 Aug 2016 04:30:30 -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 v4 08/16] reorganize indexing of multipart/signed and\r
+ multipart/encrypted\r
+In-Reply-To: <1467970047-8013-9-git-send-email-dkg@fifthhorseman.net>\r
+References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net>\r
+ <1467970047-8013-9-git-send-email-dkg@fifthhorseman.net>\r
+User-Agent: Notmuch/0.22.1+61~g2ce0f13 (https://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sat, 13 Aug 2016 13:30:30 +0900\r
+Message-ID: <87lh015lzt.fsf@maritornes.cs.unb.ca>\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, 13 Aug 2016 04:31:11 -0000\r
+\r
+Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\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
+> +        if (g_mime_multipart_get_count (multipart) > 2)\r
+> +            _notmuch_database_log (_notmuch_message_database (message),\r
+> +                                   "Warning: Unexpected extra parts of multipart/signed. Indexing anyway.\n");\r
+> +    } else if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) {\r
+\r
+I'm confused about this warning, or more importantly about whether there\r
+is an indexing behaviour change here. In particular the extra parts are\r
+indexed in a for loop which is now in the else branch of this if, so as\r
+far as I can tell, it won't be run for multipart/signed\r