1NOTMUCH-REINDEX(1)                  notmuch                 NOTMUCH-REINDEX(1)
2
3
4

NAME

6       notmuch-reindex - re-index matching messages
7

SYNOPSIS

9       notmuch reindex [option ...] <search-term> ...
10

DESCRIPTION

12       Re-index all messages matching the search terms.
13
14       See  notmuch-search-terms(7)  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
19       using 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
42              index.
43
44              See also index.decrypt in notmuch-config(1).
45

EXAMPLES

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
57       already been indexed in the clear (as in the example above).  They  can
58       ask 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

SEE ALSO

74       notmuch(1),  notmuch-compact(1),  notmuch-config(1),  notmuch-count(1),
75       notmuch-dump(1), notmuch-hooks(5),  notmuch-insert(1),  notmuch-new(1),
76       notmuch-reply(1),     notmuch-restore(1),    notmuch-search(1),    not‐
77       much-search-terms(7), notmuch-show(1), notmuch-tag(1)
78

AUTHOR

80       Carl Worth and many others
81
83       2009-2019, Carl Worth and many others
84
85
86
87
880.28.4                           May 06, 2019               NOTMUCH-REINDEX(1)
Impressum