unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Guyzmo <guyzmo+notmuch@m0g.net>,
	 Jameson Graef Rollins <jrollins@finestructure.net>
Cc: notmuch@notmuchmail.org, Daniel Kahn Gillmor <dkg@debian.org>
Subject: Re: Feature suggestion. Indexing encrypted mail?
Date: Sun, 06 Apr 2014 18:16:50 -0400	[thread overview]
Message-ID: <5341D252.90405@fifthhorseman.net> (raw)
In-Reply-To: <20140406091516.GG26903@vilya.m0g.net>

[-- Attachment #1: Type: text/plain, Size: 2878 bytes --]

On 04/06/2014 05:15 AM, Guyzmo wrote:
>     I indeed agree with this view, and I think the best process would be
> to have the MUA decrypt and index an encrypted mail when the  user wants
> it to be indexed. So the user do not get really  highly  secret messages
> disclosable by the index, and for the others take that kind of risk.

At the moment, notmuch has a "no-modify" policy to the mail storage,
with the exception of changing a few well-known flags on maildir names.

I would be pretty sad to see that change, and i don't think that's a
good idea for notmuch in general.  let's keep access to the mail store
as read-only as possible.

additionally, stripping encryption in some cases would mean stripping
cryptographic signatures (e.g. most PGP/MIME encrypted messages are
encrypted+signed, but the signature is a separate PGP part and not a
MIME part) i think it would be bad to lose cryptographic signatures in
this case.

That said, i agree that there are some scenarios where having
well-indexed mail storage even for the cleartext of encrypted messages
would be useful and could even be done with some level of safety (e.g.
where the index is itself stored on an encrypted filesystem -- notmuch
has no explicit/builtin support for an encrypted index today).

I think the most sensible way to approach this goal for notmuch would be
a two-part series of generic notmuch enhancements, which could then be
leveraged by those who need them into a cleartext index for those
messages that they are willing to take a risk on.

here are the notmuch enhancements:

 * notmuch new id:$msgid

This capability would allow notmuch to reindex a given message, clearing
the entire index of any old references and adding new references to the
current filter.

 * notmuch new --filter=$foo

The --filter option for notmuch new (or something similar) would  pass
each message in question through a pipeline-style filter and operate on
it the stdout of the filter, rather than the raw message.

Given these two enhancements (some of which may be already underway, i
confess i haven't been following closely), it wouldn't be much extra
effort for someone to implement a filter that strips encryption from the
message.  (this might still have the problem mentioned above about also
stripping PGP/MIME signatures, but the signatures and the decrypted
message itself would remain intact so they could be shown directly by
notmuch show without trouble).

once such a filter was in place, my personal preference would be that
the messages would be imported as ciphertext initially, but then when an
end-user-facing MUA gets the user to decrypt a message that has not been
indexed with this filter, it could offer a button that says "index this
message in cleartext (will leak contents to anyone who can read the index)"

	--dkg


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 1010 bytes --]

  reply	other threads:[~2014-04-06 22:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-05 16:38 Feature suggestion. Indexing encrypted mail? john.wyzer
2014-04-05 17:10 ` David Bremner
2014-04-05 18:35   ` Jeremy Nickurak
2014-04-05 19:03     ` john.wyzer
2014-04-05 19:09   ` Jameson Graef Rollins
2014-04-06  9:15     ` Guyzmo
2014-04-06 22:16       ` Daniel Kahn Gillmor [this message]
2014-04-07  8:08         ` john.wyzer
2014-04-07 15:57           ` Jameson Graef Rollins
2014-04-07 20:15             ` Jeremy Nickurak
2014-04-07 20:31               ` Jameson Graef Rollins
2014-04-07 21:06               ` Mark Walters
2014-04-08  5:25                 ` 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=5341D252.90405@fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --cc=dkg@debian.org \
    --cc=guyzmo+notmuch@m0g.net \
    --cc=jrollins@finestructure.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).