8 **notmuch** **config** **get** <*section*>.<*item*>
10 **notmuch** **config** **set** <*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.
34 Every configuration item is printed to stdout, each on a separate
39 No additional whitespace surrounds the dot or equals sign
40 characters. In a multiple-value item (a list), the values are
41 separated by semicolon characters.
43 The available configuration items are described below.
46 Notmuch will store its database here, (in
47 sub-directory named ``.notmuch`` if **database.mail\_root**
50 Default: ``$MAILDIR`` variable if set, otherwise ``$HOME/mail``.
52 **database.mail_root**
53 The top-level directory where your mail currently exists and to
54 where mail will be delivered in the future. Files should be
55 individual email messages.
57 History: this configuration value was introduced in notmuch 0.32.
59 Default: For compatibility with older configurations, the value of
60 database.path is used if **database.mail\_root** is unset.
64 Directory containing hooks run by notmuch commands. See
70 Default: ``$NAME`` variable if set, otherwise read from
73 **user.primary\_email**
74 Your primary email address.
76 Default: ``$EMAIL`` variable if set, otherwise constructed from
77 the username and hostname of the current machine.
80 A list of other email addresses at which you receive email.
85 A list of tags that will be added to all messages incorporated by
88 Default: ``unread;inbox``.
91 A list to specify files and directories that will not be searched
92 for messages by **notmuch new**. Each entry in the list is either:
94 A file or a directory name, without path, that will be ignored,
95 regardless of the location in the mail store directory hierarchy.
99 A regular expression delimited with // that will be matched
100 against the path of the file or directory relative to the database
101 path. Matching files and directories will be ignored. The
102 beginning and end of string must be explicitly anchored. For
103 example, /.*/foo$/ would match "bar/foo" and "bar/baz/foo", but
104 not "foo" or "bar/foobar".
108 **search.exclude\_tags**
109 A list of tags that will be excluded from search results by
110 default. Using an excluded tag in a query will override that
113 Default: empty list. Note that **notmuch-setup(1)** puts
114 ``deleted;spam`` here when creating new configuration file.
116 **maildir.synchronize\_flags**
117 If true, then the following maildir flags (in message filenames)
118 will be synchronized with the corresponding notmuch tags:
120 +--------+-----------------------------------------------+
122 +========+===============================================+
124 +--------+-----------------------------------------------+
126 +--------+-----------------------------------------------+
128 +--------+-----------------------------------------------+
130 +--------+-----------------------------------------------+
131 | S | unread (added when 'S' flag is not present) |
132 +--------+-----------------------------------------------+
134 The **notmuch new** command will notice flag changes in filenames
135 and update tags, while the **notmuch tag** and **notmuch restore**
136 commands will notice tag changes and update flags in filenames.
138 If there have been any changes in the maildir (new messages added,
139 old ones removed or renamed, maildir flags changed, etc.), it is
140 advisable to run **notmuch new** before **notmuch tag** or
141 **notmuch restore** commands to ensure the tag changes are
142 properly synchronized to the maildir flags, as the commands expect
143 the database and maildir to be in sync.
148 Policy for decrypting encrypted messages during indexing. Must be
149 one of: ``false``, ``auto``, ``nostash``, or ``true``.
151 When indexing an encrypted e-mail message, if this variable is set
152 to ``true``, notmuch will try to decrypt the message and index the
153 cleartext, stashing a copy of any discovered session keys for the
154 message. If ``auto``, it will try to index the cleartext if a
155 stashed session key is already known for the message (e.g. from a
156 previous copy), but will not try to access your secret keys. Use
157 ``false`` to avoid decrypting even when a stashed session key is
160 ``nostash`` is the same as ``true`` except that it will not stash
161 newly-discovered session keys in the database.
163 From the command line (i.e. during **notmuch-new(1)**,
164 **notmuch-insert(1)**, or **notmuch-reindex(1)**), the user can
165 override the database's stored decryption policy with the
166 ``--decrypt=`` option.
168 Here is a table that summarizes the functionality of each of these
171 +------------------------+-------+------+---------+------+
172 | | false | auto | nostash | true |
173 +========================+=======+======+=========+======+
174 | Index cleartext using | | X | X | X |
175 | stashed session keys | | | | |
176 +------------------------+-------+------+---------+------+
177 | Index cleartext | | | X | X |
178 | using secret keys | | | | |
179 +------------------------+-------+------+---------+------+
180 | Stash session keys | | | | X |
181 +------------------------+-------+------+---------+------+
182 | Delete stashed session | X | | | |
183 | keys on reindex | | | | |
184 +------------------------+-------+------+---------+------+
186 Stashed session keys are kept in the database as properties
187 associated with the message. See ``session-key`` in
188 **notmuch-properties(7)** for more details about how they can be
191 Be aware that the notmuch index is likely sufficient (and a
192 stashed session key is certainly sufficient) to reconstruct the
193 cleartext of the message itself, so please ensure that the notmuch
194 message index is adequately protected. DO NOT USE
195 ``index.decrypt=true`` or ``index.decrypt=nostash`` without
196 considering the security of your index.
200 **index.header.<prefix>**
201 Define the query prefix <prefix>, based on a mail header. For
202 example ``index.header.List=List-Id`` will add a probabilistic
203 prefix ``List:`` that searches the ``List-Id`` field. User
204 defined prefixes must not start with 'a'...'z'; in particular
205 adding a prefix with same name as a predefined prefix is not
206 supported. See **notmuch-search-terms(7)** for a list of existing
207 prefixes, and an explanation of probabilistic prefixes.
209 **built_with.<name>**
210 Compile time feature <name>. Current possibilities include
211 "retry_lock" (configure option, included by default).
212 (since notmuch 0.30, "compact" and "field_processor" are
216 Expansion for named query called <name>. See
217 **notmuch-search-terms(7)** for more information about named
223 The following environment variables can be used to control the behavior
227 Specifies the location of the notmuch configuration file.
230 Selects among notmuch configurations.
238 If ``NOTMUCH_CONFIG`` is unset, notmuch tries (in order)
240 - ``$XDG_CONFIG_HOME/notmuch/<profile>/config`` where ``<profile>`` is
241 defined by ``$NOTMUCH_PROFILE`` or "default"
242 - ``${HOME}/.notmuch-config<profile>`` where ``<profile>`` is
243 ``.$NOTMUCH_PROFILE`` or ""
248 If ``database.hook_dir`` is unset, notmuch tries (in order)
250 - ``$XDG_CONFIG_HOME/notmuch/<profile>/hooks`` where ``<profile>`` is
251 defined by ``$NOTMUCH_PROFILE`` or "default"
252 - ``<database.path>/.notmuch/hooks``
258 **notmuch-count(1)**,
260 **notmuch-hooks(5)**,
261 **notmuch-insert(1)**,
263 **notmuch-reply(1)**,
264 **notmuch-restore(1)**,
265 **notmuch-search(1)**,
266 **notmuch-search-terms(7)**,
267 **notmuch-properties(7)**,