unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH v3 14/15] docs: clean up documentation about decryption policies
Date: Fri,  8 Dec 2017 01:24:03 -0500	[thread overview]
Message-ID: <20171208062404.17269-15-dkg@fifthhorseman.net> (raw)
In-Reply-To: <20171208062404.17269-1-dkg@fifthhorseman.net>

Now that the range of sensible decryption policies has come into full
view, we take a bit of space to document the distinctions.

Most people will use either "auto" or "true" -- but we provide "false"
and "nostash" to handle use cases that might reasonably be requested.

Note also that these can be combined in sensible ways.  Like, if your
mail comes in regularly to a service that doesn't have access to your
secret keys, but does have access to your index, and you feel
comfortable adding selected encrypted messages to the index after
you've read them, you could stay in "auto" normally, and then when you
find yourself reading an indexable message (e.g. one you want to be
able to search for in the future, and that you don't mind exposing to
whatever entities have access to your inde), you can do:

    notmuch reindex --decrypt=true id:whatever@example.biz

That leaves your default the same (still "auto") but you get the
cleartext index and stashed session key benefits for that particular
message.
---
 doc/man1/notmuch-config.rst | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst
index 773fd9da..3ba849b2 100644
--- a/doc/man1/notmuch-config.rst
+++ b/doc/man1/notmuch-config.rst
@@ -142,7 +142,9 @@ The available configuration items are described below.
 
         **[STORED IN DATABASE]**
 
-        One of ``false``, ``auto``, ``nostash``, or ``true``.
+        Policy for decrypting encrypted messages during indexing.
+        Must be one of: ``false``, ``auto``, ``nostash``, or
+        ``true``.
 
         When indexing an encrypted e-mail message, if this variable is
         set to ``true``, notmuch will try to decrypt the message and
@@ -156,6 +158,34 @@ The available configuration items are described below.
         ``nostash`` is the same as ``true`` except that it will not
         stash newly-discovered session keys in the database.
 
+        From the command line (i.e. during **notmuch-new(1)**,
+        **notmuch-insert(1)**, or **notmuch-reindex(1)**), the user
+        can override the database's stored decryption policy with the
+        ``--decrypt=`` option.
+
+        Here is a table that summarizes the functionality of each of
+        these policies:
+
+        +------------------------+-------+------+---------+------+
+        |                        | false | auto | nostash | true |
+        +========================+=======+======+=========+======+
+        | Index cleartext using  |       |  X   |    X    |  X   |
+        | stashed session keys   |       |      |         |      |
+        +------------------------+-------+------+---------+------+
+        | Index cleartext        |       |      |    X    |  X   |
+        | using secret keys      |       |      |         |      |
+        +------------------------+-------+------+---------+------+
+        | Stash session keys     |       |      |         |  X   |
+        +------------------------+-------+------+---------+------+
+        | Delete stashed session |   X   |      |         |      |
+        | keys on reindex        |       |      |         |      |
+        +------------------------+-------+------+---------+------+
+
+        Stashed session keys are kept in the database as properties
+        associated with the message.  See ``session-key`` in
+        **notmuch-properties(7)** for more details about how they can
+        be useful.
+
         Be aware that the notmuch index is likely sufficient (and a
         stashed session key is certainly sufficient) to reconstruct
         the cleartext of the message itself, so please ensure that the
@@ -201,5 +231,6 @@ SEE ALSO
 **notmuch-restore(1)**,
 **notmuch-search(1)**,
 **notmuch-search-terms(7)**,
+**notmuch-properties(7)**,
 **notmuch-show(1)**,
 **notmuch-tag(1)**
-- 
2.15.0

  parent reply	other threads:[~2017-12-08  6:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08  6:23 session keys followup, version 3 Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 01/15] indexing: Change from try_decrypt to decrypt Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 02/15] indexopts: change _try_decrypt to _decrypt_policy Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 03/15] lib: convert notmuch decryption policy to an enum Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 04/15] crypto: new decryption policy "auto" Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 05/15] cli/reply: use decryption policy "auto" by default Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 06/15] cli/show: " Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 07/15] cli/show, reply: document use of stashed session keys in notmuch-properties Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 08/15] cli/new, insert, reindex: update documentation for --decrypt=auto Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 09/15] crypto: record whether an actual decryption attempt happened Daniel Kahn Gillmor
2017-12-08  6:23 ` [PATCH v3 10/15] cli/new, insert, reindex: change index.decrypt to "auto" by default Daniel Kahn Gillmor
2017-12-08  6:24 ` [PATCH v3 11/15] cli/reindex: destroy stashed session keys when --decrypt=false Daniel Kahn Gillmor
2017-12-08  6:24 ` [PATCH v3 12/15] crypto: actually stash session keys when decrypt=true Daniel Kahn Gillmor
2017-12-08  6:24 ` [PATCH v3 13/15] crypto: add --decrypt=nostash to avoid stashing session keys Daniel Kahn Gillmor
2017-12-08  6:24 ` Daniel Kahn Gillmor [this message]
2017-12-09  2:27   ` [PATCH v3 14/15] docs: clean up documentation about decryption policies David Bremner
2017-12-13 16:38     ` Daniel Kahn Gillmor
2017-12-08  6:24 ` [PATCH v3 15/15] python: add decrypt_policy argument to Database.index_file() Daniel Kahn Gillmor
2017-12-11 23:22   ` [PATCH v4] " Daniel Kahn Gillmor
2017-12-19 11:23     ` David Bremner
2017-12-19 19:08       ` Daniel Kahn Gillmor
2017-12-19 19:08     ` [PATCH v5] " Daniel Kahn Gillmor
2017-12-24 14:05       ` David Bremner

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=20171208062404.17269-15-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).