Re: [PATCH v2] Ignore encrypted parts when indexing.
authorAustin Clements <amdragon@MIT.EDU>
Wed, 28 Dec 2011 20:36:15 +0000 (15:36 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:23 +0000 (09:41 -0800)
08/8d291a735d33c815b85c797bb262d6e6cd56a3 [new file with mode: 0644]

diff --git a/08/8d291a735d33c815b85c797bb262d6e6cd56a3 b/08/8d291a735d33c815b85c797bb262d6e6cd56a3
new file mode 100644 (file)
index 0000000..3647be2
--- /dev/null
@@ -0,0 +1,106 @@
+Return-Path: <amdragon@mit.edu>\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 EF969431FD0\r
+       for <notmuch@notmuchmail.org>; Wed, 28 Dec 2011 12:35:31 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 RGVGwd8WxO98 for <notmuch@notmuchmail.org>;\r
+       Wed, 28 Dec 2011 12:35:31 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU\r
+       [18.7.68.37])\r
+       by olra.theworths.org (Postfix) with ESMTP id 14ED0431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 28 Dec 2011 12:35:31 -0800 (PST)\r
+X-AuditID: 12074425-b7f4a6d0000008e0-e6-4efb7d92312a\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 74.A6.02272.29D7BFE4; Wed, 28 Dec 2011 15:35:30 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pBSKZTFw017121; \r
+       Wed, 28 Dec 2011 15:35:30 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBSKZSWX013232\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Wed, 28 Dec 2011 15:35:29 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Rg0ER-0002uO-QD; Wed, 28 Dec 2011 15:36:15 -0500\r
+Date: Wed, 28 Dec 2011 15:36:15 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>\r
+Subject: Re: [PATCH v2] Ignore encrypted parts when indexing.\r
+Message-ID: <20111228203615.GE30150@mit.edu>\r
+References: <1325005901-21374-1-git-send-email-jrollins@finestructure.net>\r
+       <1325103269-14599-1-git-send-email-jrollins@finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1325103269-14599-1-git-send-email-jrollins@finestructure.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpgleLIzCtJLcpLzFFi42IRYrdT151U+9vP4MEjRYs9+7wsrt+cyezA\r
+       5HH3NJfHs1W3mAOYorhsUlJzMstSi/TtErgyNkz4yF6whKPizEW/BsZNbF2MnBwSAiYS/W2r\r
+       GSFsMYkL99aDxYUE9jFKfH5Z2sXIBWRvYJT4/XgHG4Rzkkmi5eRVKGcJo0TruV6mLkYODhYB\r
+       VYlvf4NButkENCS27V8ONlVEwEyi58sfMJtZQEti68YPYLawgK3EgfUtTCA2r4COxLe9j1kh\r
+       ZnYzSuzbu4EdIiEocXLmExaY5hv/XoLtYhaQllj+jwMkzCngLdH/fS/Y1aICKhJTTm5jm8Ao\r
+       NAtJ9ywk3bMQuhcwMq9ilE3JrdLNTczMKU5N1i1OTszLSy3StdDLzSzRS00p3cQIDmgX1R2M\r
+       Ew4pHWIU4GBU4uH1NPztJ8SaWFZcmXuIUZKDSUmU9145UIgvKT+lMiOxOCO+qDQntfgQowQH\r
+       s5II74JKoBxvSmJlVWpRPkxKmoNFSZxXU+udn5BAemJJanZqakFqEUxWhoNDSYL3Sg1Qo2BR\r
+       anpqRVpmTglCmomDE2Q4D9DwzSA1vMUFibnFmekQ+VOMilLivKdBEgIgiYzSPLheWMJ5xSgO\r
+       9Iow73aQKh5gsoLrfgU0mAlo8Llzv0AGlyQipKQaGCvKp+0NfRW/g5FVfZFg3IroM6c4zQo3\r
+       y7WqixT5/Lq+PVC21PuGTkcWh+Ksz2Yzf8+v3+jVV9Jm1tSnv3d6WmzWNs0Lyy1n/fvS9Da8\r
+       4UdeTaR1RPS5/EA/kdWlMZ1zff5YiG/628l94lHva7G9M7RKr15uus5y4OlRw0jlyE/isWJs\r
+       gSxblViKMxINtZiLihMBCOVskxMDAAA=\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\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: Wed, 28 Dec 2011 20:35:32 -0000\r
+\r
+LGTM.\r
+\r
+Quoth Jameson Graef Rollins on Dec 28 at 12:14 pm:\r
+> It appears to be an oversight that encrypted parts were indexed\r
+> previously.  The terms generated from encrypted parts are meaningless\r
+> and do nothing but add bloat to the database.  It is not worth\r
+> indexing the encrypted content, just as it's not worth indexing the\r
+> signatures in signed parts.\r
+> ---\r
+> Fixes missing colon.  Thanks Austin, Xavier.\r
+> \r
+>  lib/index.cc |    4 ++++\r
+>  1 files changed, 4 insertions(+), 0 deletions(-)\r
+> \r
+> diff --git a/lib/index.cc b/lib/index.cc\r
+> index e8e9922..d8f8b2b 100644\r
+> --- a/lib/index.cc\r
+> +++ b/lib/index.cc\r
+> @@ -339,6 +339,10 @@ _index_mime_part (notmuch_message_t *message,\r
+>              if (i > 1)\r
+>                  fprintf (stderr, "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
+>          _index_mime_part (message,\r
+>                            g_mime_multipart_get_part (multipart, i));\r
+>      }\r