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.
26 The value of the specified configuration item is printed to
27 stdout. If the item has multiple values (it is a list), each value
28 is separated by a newline character.
32 The specified configuration item is set to the given value. To
33 specify a multiple-value item (a list), provide each value as a
34 separate command-line argument.
36 If no values are provided, the specified configuration item will
37 be removed from the configuration file.
39 With the `--database` option, updates configuration metadata
40 stored in the database, rather than the default (text)
45 Every configuration item is printed to stdout, each on a separate
50 No additional whitespace surrounds the dot or equals sign
51 characters. In a multiple-value item (a list), the values are
52 separated by semicolon characters.
54 The available configuration items are described below. Non-absolute
55 paths are presumed relative to `$HOME` for items in section
58 .. nmconfig:: built_with.<name>
60 Compile time feature <name>. Current possibilities include
61 "retry_lock" (configure option, included by default).
62 (since notmuch 0.30, "compact" and "field_processor" are
65 .. nmconfig:: database.autocommit
67 How often to commit transactions to disk. `0` means wait until
68 command completes, otherwise an integer `n` specifies to commit to
69 disk after every `n` completed transactions.
71 History: this configuration value was introduced in notmuch 0.33.
73 .. nmconfig:: database.backup_dir
75 Directory to store tag dumps when upgrading database.
77 History: this configuration value was introduced in notmuch 0.32.
79 Default: A sibling directory of the Xapian database called
82 .. nmconfig:: database.hook_dir
84 Directory containing hooks run by notmuch commands. See
85 :any:`notmuch-hooks(5)`.
87 History: this configuration value was introduced in notmuch 0.32.
89 Default: See HOOKS, below.
91 .. nmconfig:: database.mail_root
93 The top-level directory where your mail currently exists and to
94 where mail will be delivered in the future. Files should be
95 individual email messages.
97 History: this configuration value was introduced in notmuch 0.32.
99 Default: For compatibility with older configurations, the value of
100 database.path is used if :nmconfig:`database.mail_root` is unset.
102 .. nmconfig:: database.path
104 Notmuch will store its database here, (in
105 sub-directory named ``.notmuch`` if :nmconfig:`database.mail_root`
108 Default: see :ref:`database`
110 .. nmconfig:: git.path
112 Default location for git repository for :any:`notmuch-git`.
114 .. nmconfig:: git.safe_fraction
116 Some :any:`notmuch-git` operations check that the fraction of
117 messages changed (in the database or in git, as appropriate) is not
118 too large. This item controls what fraction of total messages is
119 considered "not too large".
121 .. nmconfig:: git.tag_prefix
123 Default tag prefix (filter) for :any:`notmuch-git`.
125 .. nmconfig:: index.decrypt
127 Policy for decrypting encrypted messages during indexing. Must be
128 one of: ``false``, ``auto``, ``nostash``, or ``true``.
130 When indexing an encrypted e-mail message, if this variable is set
131 to ``true``, notmuch will try to decrypt the message and index the
132 cleartext, stashing a copy of any discovered session keys for the
133 message. If ``auto``, it will try to index the cleartext if a
134 stashed session key is already known for the message (e.g. from a
135 previous copy), but will not try to access your secret keys. Use
136 ``false`` to avoid decrypting even when a stashed session key is
139 ``nostash`` is the same as ``true`` except that it will not stash
140 newly-discovered session keys in the database.
142 From the command line (i.e. during :any:`notmuch-new(1)`,
143 :any:`notmuch-insert(1)`, or :any:`notmuch-reindex(1)`), the user can
144 override the database's stored decryption policy with the
145 ``--decrypt=`` option.
147 Here is a table that summarizes the functionality of each of these
150 +------------------------+-------+------+---------+------+
151 | | false | auto | nostash | true |
152 +========================+=======+======+=========+======+
153 | Index cleartext using | | X | X | X |
154 | stashed session keys | | | | |
155 +------------------------+-------+------+---------+------+
156 | Index cleartext | | | X | X |
157 | using secret keys | | | | |
158 +------------------------+-------+------+---------+------+
159 | Stash session keys | | | | X |
160 +------------------------+-------+------+---------+------+
161 | Delete stashed session | X | | | |
162 | keys on reindex | | | | |
163 +------------------------+-------+------+---------+------+
165 Stashed session keys are kept in the database as properties
166 associated with the message. See ``session-key`` in
167 :any:`notmuch-properties(7)` for more details about how they can be
170 Be aware that the notmuch index is likely sufficient (and a
171 stashed session key is certainly sufficient) to reconstruct the
172 cleartext of the message itself, so please ensure that the notmuch
173 message index is adequately protected. DO NOT USE
174 ``index.decrypt=true`` or ``index.decrypt=nostash`` without
175 considering the security of your index.
181 .. nmconfig:: index.header.<prefix>
183 Define the query prefix <prefix>, based on a mail header. For
184 example ``index.header.List=List-Id`` will add a probabilistic
185 prefix ``List:`` that searches the ``List-Id`` field. User
186 defined prefixes must not start with 'a'...'z'; in particular
187 adding a prefix with same name as a predefined prefix is not
188 supported. See :any:`notmuch-search-terms(7)` for a list of existing
189 prefixes, and an explanation of probabilistic prefixes.
191 .. nmconfig:: maildir.synchronize_flags
193 If true, then the following maildir flags (in message filenames)
194 will be synchronized with the corresponding notmuch tags:
196 +--------+-----------------------------------------------+
198 +========+===============================================+
200 +--------+-----------------------------------------------+
202 +--------+-----------------------------------------------+
204 +--------+-----------------------------------------------+
206 +--------+-----------------------------------------------+
207 | S | unread (added when 'S' flag is not present) |
208 +--------+-----------------------------------------------+
210 The :any:`notmuch-new(1)` command will notice flag changes in
211 filenames and update tags, while the :any:`notmuch-tag(1)` and
212 :any:`notmuch-restore(1)` commands will notice tag changes and
213 update flags in filenames.
215 If there have been any changes in the maildir (new messages added,
216 old ones removed or renamed, maildir flags changed, etc.), it is
217 advisable to run :any:`notmuch-new(1)` before
218 :any:`notmuch-tag(1)` or :any:`notmuch-restore(1)` commands to
219 ensure the tag changes are properly synchronized to the maildir
220 flags, as the commands expect the database and maildir to be in
225 .. nmconfig:: new.ignore
227 A list to specify files and directories that will not be searched
228 for messages by :any:`notmuch-new(1)`. Each entry in the list is either:
230 A file or a directory name, without path, that will be ignored,
231 regardless of the location in the mail store directory hierarchy.
235 A regular expression delimited with // that will be matched
236 against the path of the file or directory relative to the database
237 path. Matching files and directories will be ignored. The
238 beginning and end of string must be explicitly anchored. For
239 example, /.*/foo$/ would match "bar/foo" and "bar/baz/foo", but
240 not "foo" or "bar/foobar".
244 .. nmconfig:: new.tags
246 A list of tags that will be added to all messages incorporated by
249 Default: ``unread;inbox``.
251 .. nmconfig:: query.<name>
253 Expansion for named query called <name>. See
254 :any:`notmuch-search-terms(7)` for more information about named
257 .. nmconfig:: search.exclude_tags
259 A list of tags that will be excluded from search results by
260 default. Using an excluded tag in a query will override that
263 Default: empty list. Note that :any:`notmuch-setup(1)` puts
264 ``deleted;spam`` here when creating new configuration file.
266 .. nmconfig:: show.extra_headers
268 By default :any:`notmuch-show(1)` includes the following headers
269 in structured output if they are present in the message:
270 `Subject`, `From`, `To`, `Cc`, `Bcc`, `Reply-To`, `Date`. This
271 option allows the specification of a list of further
274 History: This configuration value was introduced in notmuch 0.35.
278 .. nmconfig:: squery.<name>
280 Expansion for named query called <name>, using s-expression syntax. See
281 :any:`notmuch-sexp-queries(7)` for more information about s-expression
284 .. nmconfig:: user.name
288 Default: ``$NAME`` variable if set, otherwise read from
291 .. nmconfig:: user.other_email
293 A list of other email addresses at which you receive email
294 (see also, :nmconfig:`user.primary_email`)
298 .. nmconfig:: user.primary_email
300 Your primary email address.
302 Default: ``$EMAIL`` variable if set, otherwise constructed from
303 the username and hostname of the current machine.
313 Notmuch configuration file search order:
315 1. File specified by :option:`notmuch --config` global option; see
318 2. File specified by :envvar:`NOTMUCH_CONFIG` environment variable.
320 3. ``$XDG_CONFIG_HOME/notmuch/<profile>/config`` where ``<profile>``
321 is defined by :envvar:`NOTMUCH_PROFILE` environment variable if
322 set, ``$XDG_CONFIG_HOME/notmuch/default/config`` otherwise.
324 4. ``$HOME/.notmuch-config.<profile>`` where ``<profile>`` is defined
325 by :envvar:`NOTMUCH_PROFILE` environment variable if set,
326 ``$HOME/.notmuch-config`` otherwise.
333 Notmuch database search order:
335 1. Directory specified by :envvar:`NOTMUCH_DATABASE` environment variable.
337 2. Directory specified by config key ``database.path``.
339 3. ``$XDG_DATA_HOME/notmuch/<profile>`` where ``<profile>``
340 is defined by :envvar:`NOTMUCH_PROFILE` environment variable if
341 set, ``$XDG_DATA_HOME/notmuch/default`` otherwise.
343 4. Directory specified by :envvar:`MAILDIR` environment variable.
350 Notmuch hook directory search order:
352 1. Directory specified by ``database.hook_dir`` configuration option.
354 2. ``$XDG_CONFIG_HOME/notmuch/<profile>/hooks`` where ``<profile>``
355 is defined by :envvar:`NOTMUCH_PROFILE` environment variable if
356 set, ``$XDG_CONFIG_HOME/notmuch/default/hooks`` otherwise.
358 3. ``<database.path>/.notmuch/hooks``
364 :any:`notmuch-count(1)`,
365 :any:`notmuch-dump(1)`,
366 :any:`notmuch-hooks(5)`,
367 :any:`notmuch-insert(1)`,
368 :any:`notmuch-new(1)`,
369 :any:`notmuch-properties(7)`,
370 :any:`notmuch-reply(1)`,
371 :any:`notmuch-restore(1)`,
372 :any:`notmuch-search(1)`,
373 :any:`notmuch-search-terms(7)`,
374 :any:`notmuch-show(1)`,
375 :any:`notmuch-tag(1)`