notmuch/doc/man1/notmuch-reindex.rst
Daniel Kahn Gillmor 6a9626a2fd cli/reindex: destroy stashed session keys when --decrypt=false
There are some situations where the user wants to get rid of the
cleartext index of a message.  For example, if they're indexing
encrypted messages normally, but suddenly they run across a message
that they really don't want any trace of in their index.

In that case, the natural thing to do is:

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

But of course, clearing the cleartext index without clearing the
stashed session key is just silly.  So we do the expected thing and
also destroy any stashed session keys while we're destroying the index
of the cleartext.

Note that stashed session keys are stored in the xapian database, but
xapian does not currently allow safe deletion (see
https://trac.xapian.org/ticket/742).

As a workaround, after removing session keys and cleartext material
from the database, the user probably should do something like "notmuch
compact" to try to purge whatever recoverable data is left in the
xapian freelist.  This problem really needs to be addressed within
xapian, though, if we want it fixed right.
2017-12-08 08:08:47 -04:00

59 lines
1.7 KiB
ReStructuredText

===============
notmuch-reindex
===============
SYNOPSIS
========
**notmuch** **reindex** [*option* ...] <*search-term*> ...
DESCRIPTION
===========
Re-index all messages matching the search terms.
See **notmuch-search-terms(7)** for details of the supported syntax for
<*search-term*\ >.
The **reindex** command searches for all messages matching the
supplied search terms, and re-creates the full-text index on these
messages using the supplied options.
Supported options for **reindex** include
``--decrypt=(true|auto|false)``
If ``true``, when encountering an encrypted message, try to
decrypt it while reindexing. If ``auto``, and notmuch already
knows about a session key for the message, it will try
decrypting using that session key but will not try to access
the user's secret keys. If decryption is successful, index
the cleartext itself.
If ``false``, notmuch reindex will also delete any stashed
session keys for all messages matching the search terms.
Be aware that the index is likely sufficient to reconstruct
the cleartext of the message itself, so please ensure that the
notmuch message index is adequately protected. DO NOT USE
``--decrypt=true`` without considering the security of your
index.
See also ``index.decrypt`` in **notmuch-config(1)**.
SEE ALSO
========
**notmuch(1)**,
**notmuch-config(1)**,
**notmuch-count(1)**,
**notmuch-dump(1)**,
**notmuch-hooks(5)**,
**notmuch-insert(1)**,
**notmuch-new(1)**,
**notmuch-reply(1)**,
**notmuch-restore(1)**,
**notmuch-search(1)**,
**notmuch-search-terms(7)**,
**notmuch-show(1)**,
**notmuch-tag(1)**