unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Ignore encrypted parts when indexing.
@ 2011-12-27 17:11 Jameson Graef Rollins
  2011-12-28  3:31 ` Austin Clements
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jameson Graef Rollins @ 2011-12-27 17:11 UTC (permalink / raw)
  To: Notmuch Mail

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-12-29 22:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-27 17:11 [PATCH] Ignore encrypted parts when indexing Jameson Graef Rollins
2011-12-28  3:31 ` Austin Clements
2011-12-28 12:40 ` Xavier Maillard
2011-12-28 20:14 ` [PATCH v2] " Jameson Graef Rollins
2011-12-28 20:36   ` Austin Clements
2011-12-28 21:53   ` Tomi Ollila
2011-12-29 22:07   ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).