Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / a2 / 71e14a25e34cc548afec3e767c33e3ef0761db
1 Return-Path: <jrollins@finestructure.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id A4D1E431FD0\r
6         for <notmuch@notmuchmail.org>; Tue, 27 Dec 2011 09:11:50 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id LJGiQL0h+WHb for <notmuch@notmuchmail.org>;\r
16         Tue, 27 Dec 2011 09:11:49 -0800 (PST)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id B0C1B431FB6\r
20         for <notmuch@notmuchmail.org>; Tue, 27 Dec 2011 09:11:49 -0800 (PST)\r
21 Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by fire-doxen-postvirus (Postfix) with ESMTP id 33D5F2E50DD9\r
23         for <notmuch@notmuchmail.org>; Tue, 27 Dec 2011 09:11:47 -0800 (PST)\r
24 X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
25 Received: from finestructure.net (99-7-169-236.lightspeed.sntcca.sbcglobal.net\r
26         [99.7.169.236]) (Authenticated sender: jrollins)\r
27         by fire-doxen-submit (Postfix) with ESMTP id 779102E50DD1\r
28         for <notmuch@notmuchmail.org>; Tue, 27 Dec 2011 09:11:42 -0800 (PST)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id E3CF213E3; Tue, 27 Dec 2011 09:11:41 -0800 (PST)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH] Ignore encrypted parts when indexing.\r
34 Date: Tue, 27 Dec 2011 09:11:41 -0800\r
35 Message-Id: <1325005901-21374-1-git-send-email-jrollins@finestructure.net>\r
36 X-Mailer: git-send-email 1.7.7.3\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Tue, 27 Dec 2011 17:11:50 -0000\r
50 \r
51 It appears to be an oversight that encrypted parts were indexed\r
52 previously.  The terms generated from encrypted parts are meaningless\r
53 and do nothing but add bloat to the database.  It is not worth\r
54 indexing the encrypted content, just as it's not worth indexing the\r
55 signatures in signed parts.\r
56 ---\r
57  lib/index.cc |    4 ++++\r
58  1 files changed, 4 insertions(+), 0 deletions(-)\r
59 \r
60 diff --git a/lib/index.cc b/lib/index.cc\r
61 index e8e9922..0cff9cd 100644\r
62 --- a/lib/index.cc\r
63 +++ b/lib/index.cc\r
64 @@ -339,6 +339,10 @@ _index_mime_part (notmuch_message_t *message,\r
65                 if (i > 1)\r
66                     fprintf (stderr, "Warning: Unexpected extra parts of multipart/signed. Indexing anyway.\n");\r
67             }\r
68 +           if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) {\r
69 +               /* Don't index encrypted parts. */\r
70 +               continue\r
71 +           }\r
72             _index_mime_part (message,\r
73                               g_mime_multipart_get_part (multipart, i));\r
74         }\r
75 -- \r
76 1.7.7.3\r
77 \r