Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A4D1E431FD0 for ; Tue, 27 Dec 2011 09:11:50 -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 LJGiQL0h+WHb for ; Tue, 27 Dec 2011 09:11:49 -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 B0C1B431FB6 for ; Tue, 27 Dec 2011 09:11:49 -0800 (PST) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id 33D5F2E50DD9 for ; Tue, 27 Dec 2011 09:11:47 -0800 (PST) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from finestructure.net (99-7-169-236.lightspeed.sntcca.sbcglobal.net [99.7.169.236]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id 779102E50DD1 for ; Tue, 27 Dec 2011 09:11:42 -0800 (PST) Received: by finestructure.net (Postfix, from userid 1000) id E3CF213E3; Tue, 27 Dec 2011 09:11:41 -0800 (PST) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH] Ignore encrypted parts when indexing. Date: Tue, 27 Dec 2011 09:11:41 -0800 Message-Id: <1325005901-21374-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.7.3 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: Tue, 27 Dec 2011 17:11:50 -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. --- lib/index.cc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index e8e9922..0cff9cd 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