unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Cc: Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] lib: index the content-type of the parts of encrypted messages
Date: Fri, 15 Sep 2017 10:48:08 +0300	[thread overview]
Message-ID: <CAB+hUn-342e7Yj6yU5mjPtikAM46gC5nNR25RPYqRWZCz13_CQ@mail.gmail.com> (raw)
In-Reply-To: <20170915053852.23663-1-dkg@fifthhorseman.net>

On Fri, Sep 15, 2017 at 8:38 AM, Daniel Kahn Gillmor
<dkg@fifthhorseman.net> wrote:
> 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)) {

Nitpick, the extra braces aren't needed here. But the patch does what
it says on the box.

I was first wondering about the usefulness of indexing
"application/octet-stream" for the encrypted content parts, but then I
think it's good for completeness.

BR,
Jani.

> +                   _notmuch_database_log (_notmuch_message_database (message),
> +                                          "Warning: Unexpected extra parts of multipart/encrypted.\n");
> +               }
>                 continue;
>             }
>             _index_mime_part (message,
> --
> 2.14.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

  reply	other threads:[~2017-09-15  7:48 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     ` [PATCH] lib: index the content-type of the parts of encrypted messages Daniel Kahn Gillmor
2017-09-15  7:48       ` Jani Nikula [this message]
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=CAB+hUn-342e7Yj6yU5mjPtikAM46gC5nNR25RPYqRWZCz13_CQ@mail.gmail.com \
    --to=jani@nikula.org \
    --cc=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).