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