8 **notmuch** **config** **get** <*section*>.<*item*>
10 **notmuch** **config** **set** [--database] <*section*>.<*item*> [*value* ...]
12 **notmuch** **config** **list**
17 The **config** command can be used to get or set settings in the notmuch
18 configuration file and corresponding database.
21 The value of the specified configuration item is printed to
22 stdout. If the item has multiple values (it is a list), each value
23 is separated by a newline character.
26 The specified configuration item is set to the given value. To
27 specify a multiple-value item (a list), provide each value as a
28 separate command-line argument.
30 If no values are provided, the specified configuration item will
31 be removed from the configuration file.
33 With the `--database` option, updates configuration metadata
34 stored in the database, rather than the default (text)
38 Every configuration item is printed to stdout, each on a separate
43 No additional whitespace surrounds the dot or equals sign
44 characters. In a multiple-value item (a list), the values are
45 separated by semicolon characters.
47 The available configuration items are described below. Non-absolute
48 paths are presumed relative to `$HOME` for items in section
52 Notmuch will store its database here, (in
53 sub-directory named ``.notmuch`` if **database.mail\_root**
56 Default: ``$MAILDIR`` variable if set, otherwise ``$HOME/mail``.
58 **database.mail_root**
59 The top-level directory where your mail currently exists and to
60 where mail will be delivered in the future. Files should be
61 individual email messages.
63 History: this configuration value was introduced in notmuch 0.32.
65 Default: For compatibility with older configurations, the value of
66 database.path is used if **database.mail\_root** is unset.
68 **database.backup_dir**
69 Directory to store tag dumps when upgrading database.
71 History: this configuration value was introduced in notmuch 0.32.
73 Default: A sibling directory of the Xapian database called
78 Directory containing hooks run by notmuch commands. See
84 Default: ``$NAME`` variable if set, otherwise read from
87 **user.primary\_email**
88 Your primary email address.
90 Default: ``$EMAIL`` variable if set, otherwise constructed from
91 the username and hostname of the current machine.
94 A list of other email addresses at which you receive email.
99 A list of tags that will be added to all messages incorporated by
102 Default: ``unread;inbox``.
105 A list to specify files and directories that will not be searched
106 for messages by **notmuch new**. Each entry in the list is either:
108 A file or a directory name, without path, that will be ignored,
109 regardless of the location in the mail store directory hierarchy.
113 A regular expression delimited with // that will be matched
114 against the path of the file or directory relative to the database
115 path. Matching files and directories will be ignored. The
116 beginning and end of string must be explicitly anchored. For
117 example, /.*/foo$/ would match "bar/foo" and "bar/baz/foo", but
118 not "foo" or "bar/foobar".
122 **search.exclude\_tags**
123 A list of tags that will be excluded from search results by
124 default. Using an excluded tag in a query will override that
127 Default: empty list. Note that **notmuch-setup(1)** puts
128 ``deleted;spam`` here when creating new configuration file.
130 **maildir.synchronize\_flags**
131 If true, then the following maildir flags (in message filenames)
132 will be synchronized with the corresponding notmuch tags:
134 +--------+-----------------------------------------------+
136 +========+===============================================+
138 +--------+-----------------------------------------------+
140 +--------+-----------------------------------------------+
142 +--------+-----------------------------------------------+
144 +--------+-----------------------------------------------+
145 | S | unread (added when 'S' flag is not present) |
146 +--------+-----------------------------------------------+
148 The **notmuch new** command will notice flag changes in filenames
149 and update tags, while the **notmuch tag** and **notmuch restore**
150 commands will notice tag changes and update flags in filenames.
152 If there have been any changes in the maildir (new messages added,
153 old ones removed or renamed, maildir flags changed, etc.), it is
154 advisable to run **notmuch new** before **notmuch tag** or
155 **notmuch restore** commands to ensure the tag changes are
156 properly synchronized to the maildir flags, as the commands expect
157 the database and maildir to be in sync.
162 Policy for decrypting encrypted messages during indexing. Must be
163 one of: ``false``, ``auto``, ``nostash``, or ``true``.
165 When indexing an encrypted e-mail message, if this variable is set
166 to ``true``, notmuch will try to decrypt the message and index the
167 cleartext, stashing a copy of any discovered session keys for the
168 message. If ``auto``, it will try to index the cleartext if a
169 stashed session key is already known for the message (e.g. from a
170 previous copy), but will not try to access your secret keys. Use
171 ``false`` to avoid decrypting even when a stashed session key is
174 ``nostash`` is the same as ``true`` except that it will not stash
175 newly-discovered session keys in the database.
177 From the command line (i.e. during **notmuch-new(1)**,
178 **notmuch-insert(1)**, or **notmuch-reindex(1)**), the user can
179 override the database's stored decryption policy with the
180 ``--decrypt=`` option.
182 Here is a table that summarizes the functionality of each of these
185 +------------------------+-------+------+---------+------+
186 | | false | auto | nostash | true |
187 +========================+=======+======+=========+======+
188 | Index cleartext using | | X | X | X |
189 | stashed session keys | | | | |
190 +------------------------+-------+------+---------+------+
191 | Index cleartext | | | X | X |
192 | using secret keys | | | | |
193 +------------------------+-------+------+---------+------+
194 | Stash session keys | | | | X |
195 +------------------------+-------+------+---------+------+
196 | Delete stashed session | X | | | |
197 | keys on reindex | | | | |
198 +------------------------+-------+------+---------+------+
200 Stashed session keys are kept in the database as properties
201 associated with the message. See ``session-key`` in
202 **notmuch-properties(7)** for more details about how they can be
205 Be aware that the notmuch index is likely sufficient (and a
206 stashed session key is certainly sufficient) to reconstruct the
207 cleartext of the message itself, so please ensure that the notmuch
208 message index is adequately protected. DO NOT USE
209 ``index.decrypt=true`` or ``index.decrypt=nostash`` without
210 considering the security of your index.
214 **index.header.<prefix>**
215 Define the query prefix <prefix>, based on a mail header. For
216 example ``index.header.List=List-Id`` will add a probabilistic
217 prefix ``List:`` that searches the ``List-Id`` field. User
218 defined prefixes must not start with 'a'...'z'; in particular
219 adding a prefix with same name as a predefined prefix is not
220 supported. See **notmuch-search-terms(7)** for a list of existing
221 prefixes, and an explanation of probabilistic prefixes.
223 **built_with.<name>**
224 Compile time feature <name>. Current possibilities include
225 "retry_lock" (configure option, included by default).
226 (since notmuch 0.30, "compact" and "field_processor" are
230 Expansion for named query called <name>. See
231 **notmuch-search-terms(7)** for more information about named
237 The following environment variables can be used to control the behavior
241 Specifies the location of the notmuch configuration file.
244 Selects among notmuch configurations.
252 If ``NOTMUCH_CONFIG`` is unset, notmuch tries (in order)
254 - ``$XDG_CONFIG_HOME/notmuch/<profile>/config`` where ``<profile>`` is
255 defined by ``$NOTMUCH_PROFILE`` or "default"
256 - ``${HOME}/.notmuch-config<profile>`` where ``<profile>`` is
257 ``.$NOTMUCH_PROFILE`` or ""
262 If ``database.hook_dir`` is unset, notmuch tries (in order)
264 - ``$XDG_CONFIG_HOME/notmuch/<profile>/hooks`` where ``<profile>`` is
265 defined by ``$NOTMUCH_PROFILE`` or "default"
266 - ``<database.path>/.notmuch/hooks``
272 **notmuch-count(1)**,
274 **notmuch-hooks(5)**,
275 **notmuch-insert(1)**,
277 **notmuch-reply(1)**,
278 **notmuch-restore(1)**,
279 **notmuch-search(1)**,
280 **notmuch-search-terms(7)**,
281 **notmuch-properties(7)**,