.\" 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-CONFIG" "1" "Oct 06, 2023" "0.38" "notmuch"
.SH NAME
notmuch-config \- access notmuch configuration file
.SH SYNOPSIS
.sp
\fBnotmuch\fP \fBconfig\fP \fBget\fP <\fIsection\fP>.<\fIitem\fP>
.sp
\fBnotmuch\fP \fBconfig\fP \fBset\fP [\-\-database] <\fIsection\fP>.<\fIitem\fP> [\fIvalue\fP ...]
.sp
\fBnotmuch\fP \fBconfig\fP \fBlist\fP
.SH DESCRIPTION
.sp
The \fBconfig\fP command can be used to get or set settings in the notmuch
configuration file and corresponding database.
.INDENT 0.0
.TP
.B get
The value of the specified configuration item is printed to
stdout. If the item has multiple values (it is a list), each value
is separated by a newline character.
.UNINDENT
.INDENT 0.0
.TP
.B set
The specified configuration item is set to the given value. To
specify a multiple\-value item (a list), provide each value as a
separate command\-line argument.
.sp
If no values are provided, the specified configuration item will
be removed from the configuration file.
.sp
With the \fI\-\-database\fP option, updates configuration metadata
stored in the database, rather than the default (text)
configuration file.
.UNINDENT
.INDENT 0.0
.TP
.B list
Every configuration item is printed to stdout, each on a separate
line of the form:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
section.item=value
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
No additional whitespace surrounds the dot or equals sign
characters. In a multiple\-value item (a list), the values are
separated by semicolon characters.
.UNINDENT
.sp
The available configuration items are described below. Non\-absolute
paths are presumed relative to \fI$HOME\fP for items in section
\fBdatabase\fP\&.
.INDENT 0.0
.TP
.B built_with.<name>
Compile time feature <name>. Current possibilities include
\(dqretry_lock\(dq (configure option, included by default).
(since notmuch 0.30, \(dqcompact\(dq and \(dqfield_processor\(dq are
always included.)
.UNINDENT
.INDENT 0.0
.TP
.B database.autocommit
How often to commit transactions to disk. \fI0\fP means wait until
command completes, otherwise an integer \fIn\fP specifies to commit to
disk after every \fIn\fP completed transactions.
.sp
History: this configuration value was introduced in notmuch 0.33.
.UNINDENT
.INDENT 0.0
.TP
.B database.backup_dir
Directory to store tag dumps when upgrading database.
.sp
History: this configuration value was introduced in notmuch 0.32.
.sp
Default: A sibling directory of the Xapian database called
\fIbackups\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B database.hook_dir
Directory containing hooks run by notmuch commands. See
\fI\%notmuch\-hooks\fP\&.
.sp
History: this configuration value was introduced in notmuch 0.32.
.sp
Default: See HOOKS, below.
.UNINDENT
.INDENT 0.0
.TP
.B database.mail_root
The top\-level directory where your mail currently exists and to
where mail will be delivered in the future. Files should be
individual email messages.
.sp
History: this configuration value was introduced in notmuch 0.32.
.sp
Default: For compatibility with older configurations, the value of
database.path is used if \fI\%database.mail_root\fP is unset.
.UNINDENT
.INDENT 0.0
.TP
.B database.path
Notmuch will store its database here, (in
sub\-directory named \fB\&.notmuch\fP if \fI\%database.mail_root\fP
is unset).
.sp
Default: see \fI\%DATABASE LOCATION\fP
.UNINDENT
.INDENT 0.0
.TP
.B git.path
Default location for git repository for \fI\%notmuch\-git\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B git.safe_fraction
Some \fI\%notmuch\-git\fP operations check that the fraction of
messages changed (in the database or in git, as appropriate) is not
too large. This item controls what fraction of total messages is
considered \(dqnot too large\(dq.
.UNINDENT
.INDENT 0.0
.TP
.B git.tag_prefix
Default tag prefix (filter) for \fI\%notmuch\-git\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B index.as_text
List of regular expressions (without delimiters) for MIME types to
be indexed as text. Currently this applies only to attachments.  By
default the regex matches anywhere in the content type; if the
user wants an anchored match, they should include anchors in their
regexes.
.sp
History: This configuration value was introduced in notmuch 0.38.
.UNINDENT
.INDENT 0.0
.TP
.B index.decrypt
Policy for decrypting encrypted messages during indexing.  Must be
one of: \fBfalse\fP, \fBauto\fP, \fBnostash\fP, or \fBtrue\fP\&.
.sp
When indexing an encrypted e\-mail message, if this variable is set
to \fBtrue\fP, notmuch will try to decrypt the message and index the
cleartext, stashing a copy of any discovered session keys for the
message.  If \fBauto\fP, it will try to index the cleartext if a
stashed session key is already known for the message (e.g. from a
previous copy), but will not try to access your secret keys.  Use
\fBfalse\fP to avoid decrypting even when a stashed session key is
already present.
.sp
\fBnostash\fP is the same as \fBtrue\fP except that it will not stash
newly\-discovered session keys in the database.
.sp
From the command line (i.e. during \fI\%notmuch\-new\fP,
\fI\%notmuch\-insert\fP, or \fI\%notmuch\-reindex\fP), the user can
override the database\(aqs stored decryption policy with the
\fB\-\-decrypt=\fP option.
.sp
Here is a table that summarizes the functionality of each of these
policies:
.TS
center;
|l|l|l|l|l|.
_
T{
T}	T{
false
T}	T{
auto
T}	T{
nostash
T}	T{
true
T}
_
T{
Index cleartext using
stashed session keys
T}	T{
T}	T{
X
T}	T{
X
T}	T{
X
T}
_
T{
Index cleartext
using secret keys
T}	T{
T}	T{
T}	T{
X
T}	T{
X
T}
_
T{
Stash session keys
T}	T{
T}	T{
T}	T{
T}	T{
X
T}
_
T{
Delete stashed session
keys on reindex
T}	T{
X
T}	T{
T}	T{
T}	T{
T}
_
.TE
.sp
Stashed session keys are kept in the database as properties
associated with the message.  See \fBsession\-key\fP in
\fI\%notmuch\-properties\fP for more details about how they can be
useful.
.sp
Be aware that the notmuch 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
\fBindex.decrypt=true\fP or \fBindex.decrypt=nostash\fP without
considering the security of your index.
.sp
Default: \fBauto\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B index.header.<prefix>
Define the query prefix <prefix>, based on a mail header. For
example \fBindex.header.List=List\-Id\fP will add a probabilistic
prefix \fBList:\fP that searches the \fBList\-Id\fP field.  User
defined prefixes must not start with \(aqa\(aq...\(aqz\(aq; in particular
adding a prefix with same name as a predefined prefix is not
supported. See \fI\%notmuch\-search\-terms\fP for a list of existing
prefixes, and an explanation of probabilistic prefixes.
.UNINDENT
.INDENT 0.0
.TP
.B maildir.synchronize_flags
If true, then the following maildir flags (in message filenames)
will be synchronized with the corresponding notmuch tags:
.TS
center;
|l|l|.
_
T{
Flag
T}	T{
Tag
T}
_
T{
D
T}	T{
draft
T}
_
T{
F
T}	T{
flagged
T}
_
T{
P
T}	T{
passed
T}
_
T{
R
T}	T{
replied
T}
_
T{
S
T}	T{
unread (added when \(aqS\(aq flag is not present)
T}
_
.TE
.sp
The \fI\%notmuch\-new\fP command will notice flag changes in
filenames and update tags, while the \fI\%notmuch\-tag\fP and
\fI\%notmuch\-restore\fP commands will notice tag changes and
update flags in filenames.
.sp
If there have been any changes in the maildir (new messages added,
old ones removed or renamed, maildir flags changed, etc.), it is
advisable to run \fI\%notmuch\-new\fP before
\fI\%notmuch\-tag\fP or \fI\%notmuch\-restore\fP commands to
ensure the tag changes are properly synchronized to the maildir
flags, as the commands expect the database and maildir to be in
sync.
.sp
Default: \fBtrue\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B new.ignore
A list to specify files and directories that will not be searched
for messages by \fI\%notmuch\-new\fP\&. Each entry in the list is either:
.sp
A file or a directory name, without path, that will be ignored,
regardless of the location in the mail store directory hierarchy.
.sp
Or:
.sp
A regular expression delimited with // that will be matched
against the path of the file or directory relative to the database
path. Matching files and directories will be ignored. The
beginning and end of string must be explicitly anchored. For
example, /.*/foo$/ would match \(dqbar/foo\(dq and \(dqbar/baz/foo\(dq, but
not \(dqfoo\(dq or \(dqbar/foobar\(dq.
.sp
Default: empty list.
.UNINDENT
.INDENT 0.0
.TP
.B new.tags
A list of tags that will be added to all messages incorporated by
\fBnotmuch new\fP\&.
.sp
Default: \fBunread;inbox\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B query.<name>
Expansion for named query called <name>. See
\fI\%notmuch\-search\-terms\fP for more information about named
queries.
.UNINDENT
.INDENT 0.0
.TP
.B search.exclude_tags
A list of tags that will be excluded from search results by
default. Using an excluded tag in a query will override that
exclusion.
.sp
Default: empty list. Note that \fI\%notmuch\fP puts
\fBdeleted;spam\fP here when creating new configuration file.
.UNINDENT
.INDENT 0.0
.TP
.B show.extra_headers
By default \fI\%notmuch\-show\fP includes the following headers
in structured output if they are present in the message:
\fISubject\fP, \fIFrom\fP, \fITo\fP, \fICc\fP, \fIBcc\fP, \fIReply\-To\fP, \fIDate\fP\&. This
option allows the specification of a list of further
headers to output.
.sp
History: This configuration value was introduced in notmuch 0.35.
.sp
Default: empty list.
.UNINDENT
.INDENT 0.0
.TP
.B squery.<name>
Expansion for named query called <name>, using s\-expression syntax. See
\fI\%notmuch\-sexp\-queries\fP for more information about s\-expression
queries.
.UNINDENT
.INDENT 0.0
.TP
.B user.name
Your full name.
.sp
Default: \fB$NAME\fP variable if set, otherwise read from
\fB/etc/passwd\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B user.other_email
A list of other email addresses at which you receive email
(see also, \fI\%user.primary_email\fP)
.sp
Default: not set.
.UNINDENT
.INDENT 0.0
.TP
.B user.primary_email
Your primary email address.
.sp
Default: \fB$EMAIL\fP variable if set, otherwise constructed from
the username and hostname of the current machine.
.UNINDENT
.SH FILES
.SS CONFIGURATION
.sp
Notmuch configuration file search order:
.INDENT 0.0
.IP 1. 3
File specified by \fI\%notmuch \-\-config\fP global option; see
\fI\%notmuch\fP\&.
.IP 2. 3
File specified by \fI\%NOTMUCH_CONFIG\fP environment variable.
.IP 3. 3
\fB$XDG_CONFIG_HOME/notmuch/<profile>/config\fP where \fB<profile>\fP
is defined by \fI\%NOTMUCH_PROFILE\fP environment variable if
set, \fB$XDG_CONFIG_HOME/notmuch/default/config\fP otherwise.
.IP 4. 3
\fB$HOME/.notmuch\-config.<profile>\fP where \fB<profile>\fP is defined
by \fI\%NOTMUCH_PROFILE\fP environment variable if set,
\fB$HOME/.notmuch\-config\fP otherwise.
.UNINDENT
.SS DATABASE LOCATION
.sp
Notmuch database search order:
.INDENT 0.0
.IP 1. 3
Directory specified by \fI\%NOTMUCH_DATABASE\fP environment variable.
.IP 2. 3
Directory specified by config key \fBdatabase.path\fP\&.
.IP 3. 3
\fB$XDG_DATA_HOME/notmuch/<profile>\fP where \fB<profile>\fP
is defined by \fI\%NOTMUCH_PROFILE\fP environment variable if
set, \fB$XDG_DATA_HOME/notmuch/default\fP otherwise.
.IP 4. 3
Directory specified by \fBMAILDIR\fP environment variable.
.IP 5. 3
\fB$HOME/mail\fP
.UNINDENT
.SS HOOKS
.sp
Notmuch hook directory search order:
.INDENT 0.0
.IP 1. 3
Directory specified by \fBdatabase.hook_dir\fP configuration option.
.IP 2. 3
\fB$XDG_CONFIG_HOME/notmuch/<profile>/hooks\fP where \fB<profile>\fP
is defined by \fI\%NOTMUCH_PROFILE\fP environment variable if
set, \fB$XDG_CONFIG_HOME/notmuch/default/hooks\fP otherwise.
.IP 3. 3
\fB<database.path>/.notmuch/hooks\fP
.UNINDENT
.SH SEE ALSO
.sp
\fI\%notmuch\fP,
\fI\%notmuch\-count\fP,
\fI\%notmuch\-dump\fP,
\fI\%notmuch\-hooks\fP,
\fI\%notmuch\-insert\fP,
\fI\%notmuch\-new\fP,
\fI\%notmuch\-properties\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-2023, Carl Worth and many others
.\" Generated by docutils manpage writer.
.
