From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH] lib: index the content-type of the parts of encrypted messages
Date: Fri, 15 Sep 2017 01:38:52 -0400 [thread overview]
Message-ID: <20170915053852.23663-1-dkg@fifthhorseman.net> (raw)
In-Reply-To: <87zi9ywfuw.fsf@fifthhorseman.net>
This is a logical followup to "lib: index the content type of
signature parts", which will make it easier to record the message
structure of all messages.
---
lib/index.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/index.cc b/lib/index.cc
index 0beaae62..ceb444df 100644
--- a/lib/index.cc
+++ b/lib/index.cc
@@ -409,7 +409,14 @@ _index_mime_part (notmuch_message_t *message,
}
}
if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) {
- /* Don't index encrypted parts. */
+ /* Don't index encrypted parts, but index their content type. */
+ _index_content_type (message,
+ g_mime_multipart_get_part (multipart, i));
+ if ((i != GMIME_MULTIPART_ENCRYPTED_VERSION) &&
+ (i != GMIME_MULTIPART_ENCRYPTED_CONTENT)) {
+ _notmuch_database_log (_notmuch_message_database (message),
+ "Warning: Unexpected extra parts of multipart/encrypted.\n");
+ }
continue;
}
_index_mime_part (message,
--
2.14.1
next prev parent reply other threads:[~2017-09-15 5:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 19:13 [PATCH 0/2] lib: signature content type indexing Jani Nikula
2017-09-13 19:13 ` [PATCH 1/2] lib: abstract " Jani Nikula
2017-09-13 19:13 ` [PATCH 2/2] lib: index the content type of signature parts Jani Nikula
2017-09-13 19:36 ` Daniel Kahn Gillmor
2017-09-15 5:38 ` Daniel Kahn Gillmor [this message]
2017-09-15 7:48 ` [PATCH] lib: index the content-type of the parts of encrypted messages Jani Nikula
2017-09-15 14:24 ` Daniel Kahn Gillmor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170915053852.23663-1-dkg@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).