1 <h1>NOTMUCH-REINDEX(1)</h1>
5 notmuch-reindex - re-index matching messages
10 <b>notmuch</b> <b>reindex</b> [<u>option</u> ...] <<u>search-term</u>> ...
15 Re-index all messages matching the search terms.
17 See <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7) for details of the supported syntax for
18 <<u>search-term</u>>.
20 The <b>reindex</b> command searches for all messages matching the supplied
21 search terms, and re-creates the full-text index on these messages
22 using the supplied options.
24 Supported options for <b>reindex</b> include
26 <b>--decrypt=(true|nostash|auto|false)</b>
27 If <b>true</b>, when encountering an encrypted message, try to decrypt
28 it while reindexing, stashing any session keys discovered. If
29 <b>auto</b>, and notmuch already knows about a session key for the mes‐
30 sage, it will try decrypting using that session key but will not
31 try to access the user's secret keys. If decryption is success‐
32 ful, index the cleartext itself.
34 <b>nostash</b> is the same as <b>true</b> except that it will not stash
35 newly-discovered session keys in the database.
37 If <b>false</b>, notmuch reindex will also delete any stashed session
38 keys for all messages matching the search terms.
40 Be aware that the index is likely sufficient (and a stashed ses‐
41 sion key is certainly sufficient) to reconstruct the cleartext
42 of the message itself, so please ensure that the notmuch message
43 index is adequately protected. DO NOT USE <b>--decrypt=true</b> or
44 <b>--decrypt=nostash</b> without considering the security of your
47 See also <b>index.decrypt</b> in <a href='../notmuch-config-1/'>notmuch-config</a>(1).
52 A user just received an encrypted message without indexing its cleart‐
53 ext. After reading it (via <b>notmuch</b> <b>show</b> <b>--decrypt=true</b>), they decide
54 that they want to index its cleartext so that they can easily find it
55 later and read it without having to have access to their secret keys:
57 notmuch reindex --decrypt=true id:1234567@example.com
59 A user wants to change their policy going forward to start indexing
60 cleartext. But they also want indexed access to the cleartext of all
61 previously-received encrypted messages. Some messages might have
62 already been indexed in the clear (as in the example above). They can
63 ask notmuch to just reindex the not-yet-indexed messages:
65 notmuch config set index.decrypt true
66 notmuch reindex tag:encrypted and not property:index.decryption=success
68 Later, the user changes their mind, and wants to stop indexing cleart‐
69 ext (perhaps their threat model has changed, or their trust in their
70 index store has been shaken). They also want to clear all of their old
71 cleartext from the index. Note that they compact the database after‐
72 ward as a workaround for <u>https://trac.xapian.org/ticket/742</u>:
74 notmuch config set index.decrypt false
75 notmuch reindex property:index.decryption=success
81 <a href='../notmuch-1/'>notmuch</a>(1), <a href='../notmuch-compact-1/'>notmuch-compact</a>(1), <a href='../notmuch-config-1/'>notmuch-config</a>(1), <a href='../notmuch-count-1/'>notmuch-count</a>(1),
82 <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>notmuch-hooks</a>(5), <a href='../notmuch-insert-1/'>notmuch-insert</a>(1), <a href='../notmuch-new-1/'>notmuch-new</a>(1),
83 <a href='../notmuch-reply-1/'>notmuch-reply</a>(1), <a href='../notmuch-restore-1/'>notmuch-restore</a>(1), <a href='../notmuch-search-1/'>notmuch-search</a>(1), <a href='../notmuch-search-terms-7/'>not‐</a>
84 <a href='../notmuch-search-terms-7/'>much-search-terms</a>(7), <a href='../notmuch-show-1/'>notmuch-show</a>(1), <a href='../notmuch-tag-1/'>notmuch-tag</a>(1)
89 Carl Worth and many others
94 2009-2018, Carl Worth and many others