10 **notmuch** **config** **get** <*section*>.<*item*>
12 **notmuch** **config** **set** [--database] <*section*>.<*item*> [*value* ...]
14 **notmuch** **config** **list**
19 The **config** command can be used to get or set settings in the notmuch
20 configuration file and corresponding database.
23 The value of the specified configuration item is printed to
24 stdout. If the item has multiple values (it is a list), each value
25 is separated by a newline character.
28 The specified configuration item is set to the given value. To
29 specify a multiple-value item (a list), provide each value as a
30 separate command-line argument.
32 If no values are provided, the specified configuration item will
33 be removed from the configuration file.
35 With the `--database` option, updates configuration metadata
36 stored in the database, rather than the default (text)
40 Every configuration item is printed to stdout, each on a separate
45 No additional whitespace surrounds the dot or equals sign
46 characters. In a multiple-value item (a list), the values are
47 separated by semicolon characters.
49 The available configuration items are described below. Non-absolute
50 paths are presumed relative to `$HOME` for items in section
54 Notmuch will store its database here, (in
55 sub-directory named ``.notmuch`` if **database.mail\_root**
58 Default: ``$MAILDIR`` variable if set, otherwise ``$HOME/mail``.
60 **database.mail_root**
61 The top-level directory where your mail currently exists and to
62 where mail will be delivered in the future. Files should be
63 individual email messages.
65 History: this configuration value was introduced in notmuch 0.32.
67 Default: For compatibility with older configurations, the value of
68 database.path is used if **database.mail\_root** is unset.
70 **database.backup_dir**
71 Directory to store tag dumps when upgrading database.
73 History: this configuration value was introduced in notmuch 0.32.
75 Default: A sibling directory of the Xapian database called
80 Directory containing hooks run by notmuch commands. See
81 :any:`notmuch-hooks(5)`.
86 Default: ``$NAME`` variable if set, otherwise read from
89 **user.primary\_email**
90 Your primary email address.
92 Default: ``$EMAIL`` variable if set, otherwise constructed from
93 the username and hostname of the current machine.
96 A list of other email addresses at which you receive email.
101 A list of tags that will be added to all messages incorporated by
104 Default: ``unread;inbox``.
107 A list to specify files and directories that will not be searched
108 for messages by :any:`notmuch-new(1)`. Each entry in the list is either:
110 A file or a directory name, without path, that will be ignored,
111 regardless of the location in the mail store directory hierarchy.
115 A regular expression delimited with // that will be matched
116 against the path of the file or directory relative to the database
117 path. Matching files and directories will be ignored. The
118 beginning and end of string must be explicitly anchored. For
119 example, /.*/foo$/ would match "bar/foo" and "bar/baz/foo", but
120 not "foo" or "bar/foobar".
124 **search.exclude\_tags**
125 A list of tags that will be excluded from search results by
126 default. Using an excluded tag in a query will override that
129 Default: empty list. Note that :any:`notmuch-setup(1)` puts
130 ``deleted;spam`` here when creating new configuration file.
132 **maildir.synchronize\_flags**
133 If true, then the following maildir flags (in message filenames)
134 will be synchronized with the corresponding notmuch tags:
136 +--------+-----------------------------------------------+
138 +========+===============================================+
140 +--------+-----------------------------------------------+
142 +--------+-----------------------------------------------+
144 +--------+-----------------------------------------------+
146 +--------+-----------------------------------------------+
147 | S | unread (added when 'S' flag is not present) |
148 +--------+-----------------------------------------------+
150 The :any:`notmuch-new(1)` command will notice flag changes in
151 filenames and update tags, while the :any:`notmuch-tag(1)` and
152 :any:`notmuch-restore(1)` commands will notice tag changes and
153 update flags in filenames.
155 If there have been any changes in the maildir (new messages added,
156 old ones removed or renamed, maildir flags changed, etc.), it is
157 advisable to run :any:`notmuch-new(1)` before
158 :any:`notmuch-tag(1)` or :any:`notmuch-restore(1)` commands to
159 ensure the tag changes are properly synchronized to the maildir
160 flags, as the commands expect the database and maildir to be in
166 Policy for decrypting encrypted messages during indexing. Must be
167 one of: ``false``, ``auto``, ``nostash``, or ``true``.
169 When indexing an encrypted e-mail message, if this variable is set
170 to ``true``, notmuch will try to decrypt the message and index the
171 cleartext, stashing a copy of any discovered session keys for the
172 message. If ``auto``, it will try to index the cleartext if a
173 stashed session key is already known for the message (e.g. from a
174 previous copy), but will not try to access your secret keys. Use
175 ``false`` to avoid decrypting even when a stashed session key is
178 ``nostash`` is the same as ``true`` except that it will not stash
179 newly-discovered session keys in the database.
181 From the command line (i.e. during :any:`notmuch-new(1)`,
182 :any:`notmuch-insert(1)`, or :any:`notmuch-reindex(1)`), the user can
183 override the database's stored decryption policy with the
184 ``--decrypt=`` option.
186 Here is a table that summarizes the functionality of each of these
189 +------------------------+-------+------+---------+------+
190 | | false | auto | nostash | true |
191 +========================+=======+======+=========+======+
192 | Index cleartext using | | X | X | X |
193 | stashed session keys | | | | |
194 +------------------------+-------+------+---------+------+
195 | Index cleartext | | | X | X |
196 | using secret keys | | | | |
197 +------------------------+-------+------+---------+------+
198 | Stash session keys | | | | X |
199 +------------------------+-------+------+---------+------+
200 | Delete stashed session | X | | | |
201 | keys on reindex | | | | |
202 +------------------------+-------+------+---------+------+
204 Stashed session keys are kept in the database as properties
205 associated with the message. See ``session-key`` in
206 :any:`notmuch-properties(7)` for more details about how they can be
209 Be aware that the notmuch index is likely sufficient (and a
210 stashed session key is certainly sufficient) to reconstruct the
211 cleartext of the message itself, so please ensure that the notmuch
212 message index is adequately protected. DO NOT USE
213 ``index.decrypt=true`` or ``index.decrypt=nostash`` without
214 considering the security of your index.
218 **index.header.<prefix>**
219 Define the query prefix <prefix>, based on a mail header. For
220 example ``index.header.List=List-Id`` will add a probabilistic
221 prefix ``List:`` that searches the ``List-Id`` field. User
222 defined prefixes must not start with 'a'...'z'; in particular
223 adding a prefix with same name as a predefined prefix is not
224 supported. See :any:`notmuch-search-terms(7)` for a list of existing
225 prefixes, and an explanation of probabilistic prefixes.
227 **built_with.<name>**
228 Compile time feature <name>. Current possibilities include
229 "retry_lock" (configure option, included by default).
230 (since notmuch 0.30, "compact" and "field_processor" are
234 Expansion for named query called <name>. See
235 :any:`notmuch-search-terms(7)` for more information about named
241 The following environment variables can be used to control the behavior
245 Specifies the location of the notmuch configuration file.
248 Selects among notmuch configurations.
256 If ``NOTMUCH_CONFIG`` is unset, notmuch tries (in order)
258 - ``$XDG_CONFIG_HOME/notmuch/<profile>/config`` where ``<profile>`` is
259 defined by ``$NOTMUCH_PROFILE`` or "default"
260 - ``${HOME}/.notmuch-config<profile>`` where ``<profile>`` is
261 ``.$NOTMUCH_PROFILE`` or ""
266 If ``database.hook_dir`` is unset, notmuch tries (in order)
268 - ``$XDG_CONFIG_HOME/notmuch/<profile>/hooks`` where ``<profile>`` is
269 defined by ``$NOTMUCH_PROFILE`` or "default"
270 - ``<database.path>/.notmuch/hooks``
276 :any:`notmuch-count(1)`,
277 :any:`notmuch-dump(1)`,
278 :any:`notmuch-hooks(5)`,
279 :any:`notmuch-insert(1)`,
280 :any:`notmuch-new(1)`,
281 :any:`notmuch-properties(7)`,
282 :any:`notmuch-reply(1)`,
283 :any:`notmuch-restore(1)`,
284 :any:`notmuch-search(1)`,
285 :any:`notmuch-search-terms(7)`,
286 :any:`notmuch-show(1)`,
287 :any:`notmuch-tag(1)`