From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D8E4C431FD0 for ; Wed, 28 Dec 2011 12:14:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 Y-2b6hfs0-Cn for ; Wed, 28 Dec 2011 12:14:38 -0800 (PST) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id E1A2D431FB6 for ; Wed, 28 Dec 2011 12:14:37 -0800 (PST) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id 5733266E0083 for ; Wed, 28 Dec 2011 12:14:37 -0800 (PST) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from finestructure.net (adsl-71-131-189-172.dsl.sntc01.pacbell.net [71.131.189.172]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id 8034966E001B for ; Wed, 28 Dec 2011 12:14:31 -0800 (PST) Received: by finestructure.net (Postfix, from userid 1000) id 111C83BC; Wed, 28 Dec 2011 12:14:29 -0800 (PST) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH v2] Ignore encrypted parts when indexing. Date: Wed, 28 Dec 2011 12:14:29 -0800 Message-Id: <1325103269-14599-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1325005901-21374-1-git-send-email-jrollins@finestructure.net> References: <1325005901-21374-1-git-send-email-jrollins@finestructure.net> 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: Wed, 28 Dec 2011 20:14:39 -0000 It appears to be an oversight that encrypted parts were indexed previously. The terms generated from encrypted parts are meaningless and do nothing but add bloat to the database. It is not worth indexing the encrypted content, just as it's not worth indexing the signatures in signed parts. --- Fixes missing colon. Thanks Austin, Xavier. lib/index.cc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index e8e9922..d8f8b2b 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -339,6 +339,10 @@ _index_mime_part (notmuch_message_t *message, if (i > 1) fprintf (stderr, "Warning: Unexpected extra parts of multipart/signed. Indexing anyway.\n"); } + if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) { + /* Don't index encrypted parts. */ + continue; + } _index_mime_part (message, g_mime_multipart_get_part (multipart, i)); } -- 1.7.7.3