.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "NOTMUCH-REINDEX" "1" "Oct 03, 2024" "0.38.3" "notmuch" .SH NAME notmuch-reindex \- re-index matching messages .SH SYNOPSIS .sp \fBnotmuch\fP \fBreindex\fP [\fIoption\fP ...] <\fIsearch\-term\fP> ... .SH DESCRIPTION .sp Re\-index all messages matching the search terms. .sp See \fI\%notmuch\-search\-terms\fP for details of the supported syntax for <\fIsearch\-term\fP>. .sp The \fBreindex\fP command searches for all messages matching the supplied search terms, and re\-creates the full\-text index on these messages using the supplied options. .sp Supported options for \fBreindex\fP include .INDENT 0.0 .TP .B \-\-decrypt=(true|nostash|auto|false) If \fBtrue\fP, when encountering an encrypted message, try to decrypt it while reindexing, stashing any session keys discovered. If \fBauto\fP, 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\(aqs secret keys. If decryption is successful, index the cleartext itself. .sp \fBnostash\fP is the same as \fBtrue\fP except that it will not stash newly\-discovered session keys in the database. .sp If \fBfalse\fP, notmuch reindex will also delete any stashed session keys for all messages matching the search terms. .sp Be aware that the 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 notmuch message index is adequately protected. DO NOT USE \fB\-\-decrypt=true\fP or \fB\-\-decrypt=nostash\fP without considering the security of your index. .sp See also \fBindex.decrypt\fP in \fI\%notmuch\-config\fP\&. .UNINDENT .SH EXAMPLES .sp A user just received an encrypted message without indexing its cleartext. After reading it (via \fBnotmuch show \-\-decrypt=true\fP), they decide that they want to index its cleartext so that they can easily find it later and read it without having to have access to their secret keys: .INDENT 0.0 .INDENT 3.5 .sp .EX notmuch reindex \-\-decrypt=true id:1234567@example.com .EE .UNINDENT .UNINDENT .sp A user wants to change their policy going forward to start indexing cleartext. But they also want indexed access to the cleartext of all previously\-received encrypted messages. Some messages might have already been indexed in the clear (as in the example above). They can ask notmuch to just reindex the not\-yet\-indexed messages: .INDENT 0.0 .INDENT 3.5 .sp .EX notmuch config set index.decrypt true notmuch reindex tag:encrypted and not property:index.decryption=success .EE .UNINDENT .UNINDENT .sp Later, the user changes their mind, and wants to stop indexing cleartext (perhaps their threat model has changed, or their trust in their index store has been shaken). They also want to clear all of their old cleartext from the index. Note that they compact the database afterward as a workaround for \X'tty: link https://trac.xapian.org/ticket/742'\fI\%https://trac.xapian.org/ticket/742\fP\X'tty: link': .INDENT 0.0 .INDENT 3.5 .sp .EX notmuch config set index.decrypt false notmuch reindex property:index.decryption=success notmuch compact .EE .UNINDENT .UNINDENT .SH SEE ALSO .sp \fI\%notmuch\fP, \fI\%notmuch\-compact\fP, \fI\%notmuch\-config\fP, \fI\%notmuch\-count\fP, \fI\%notmuch\-dump\fP, \fI\%notmuch\-hooks\fP, \fI\%notmuch\-insert\fP, \fI\%notmuch\-new\fP, \fI\%notmuch\-reply\fP, \fI\%notmuch\-restore\fP, \fI\%notmuch\-search\fP, \fI\%notmuch\-search\-terms\fP, \fI\%notmuch\-show\fP, \fI\%notmuch\-tag\fP .SH AUTHOR Carl Worth and many others .SH COPYRIGHT 2009-2024, Carl Worth and many others .\" Generated by docutils manpage writer. .