1NOTMUCH-CONFIG(1) notmuch NOTMUCH-CONFIG(1)
2
3
4
6 notmuch-config - access notmuch configuration file
7
9 notmuch config get <section>.<item>
10
11 notmuch config set [--database] <section>.<item> [value ...]
12
13 notmuch config list
14
16 The config command can be used to get or set settings in the notmuch
17 configuration file and corresponding database.
18
19 get The value of the specified configuration item is printed to std‐
20 out. If the item has multiple values (it is a list), each value
21 is separated by a newline character.
22
23 set The specified configuration item is set to the given value. To
24 specify a multiple-value item (a list), provide each value as a
25 separate command-line argument.
26
27 If no values are provided, the specified configuration item will
28 be removed from the configuration file.
29
30 With the --database option, updates configuration metadata
31 stored in the database, rather than the default (text) configu‐
32 ration file.
33
34 list Every configuration item is printed to stdout, each on a sepa‐
35 rate line of the form:
36
37 section.item=value
38
39 No additional whitespace surrounds the dot or equals sign char‐
40 acters. In a multiple-value item (a list), the values are sepa‐
41 rated by semicolon characters.
42
43 The available configuration items are described below. Non-absolute
44 paths are presumed relative to $HOME for items in section database.
45
46 built_with.<name>
47 Compile time feature <name>. Current possibilities include
48 "retry_lock" (configure option, included by default). (since
49 notmuch 0.30, "compact" and "field_processor" are always in‐
50 cluded.)
51
52 database.autocommit
53 How often to commit transactions to disk. 0 means wait until
54 command completes, otherwise an integer n specifies to commit to
55 disk after every n completed transactions.
56
57 History: this configuration value was introduced in notmuch
58 0.33.
59
60 database.backup_dir
61 Directory to store tag dumps when upgrading database.
62
63 History: this configuration value was introduced in notmuch
64 0.32.
65
66 Default: A sibling directory of the Xapian database called back‐
67 ups.
68
69 database.hook_dir
70 Directory containing hooks run by notmuch commands. See
71 notmuch-hooks.
72
73 History: this configuration value was introduced in notmuch
74 0.32.
75
76 Default: See HOOKS, below.
77
78 database.mail_root
79 The top-level directory where your mail currently exists and to
80 where mail will be delivered in the future. Files should be in‐
81 dividual email messages.
82
83 History: this configuration value was introduced in notmuch
84 0.32.
85
86 Default: For compatibility with older configurations, the value
87 of database.path is used if database.mail_root is unset.
88
89 database.path
90 Notmuch will store its database here, (in sub-directory named
91 .notmuch if database.mail_root is unset).
92
93 Default: see DATABASE LOCATION
94
95 git.path
96 Default location for git repository for notmuch-git.
97
98 git.safe_fraction
99 Some notmuch-git operations check that the fraction of messages
100 changed (in the database or in git, as appropriate) is not too
101 large. This item controls what fraction of total messages is
102 considered "not too large".
103
104 git.tag_prefix
105 Default tag prefix (filter) for notmuch-git.
106
107 index.as_text
108 List of regular expressions (without delimiters) for MIME types
109 to be indexed as text. Currently this applies only to attach‐
110 ments. By default the regex matches anywhere in the content
111 type; if the user wants an anchored match, they should include
112 anchors in their regexes.
113
114 History: This configuration value was introduced in notmuch
115 0.38.
116
117 index.decrypt
118 Policy for decrypting encrypted messages during indexing. Must
119 be one of: false, auto, nostash, or true.
120
121 When indexing an encrypted e-mail message, if this variable is
122 set to true, notmuch will try to decrypt the message and index
123 the cleartext, stashing a copy of any discovered session keys
124 for the message. If auto, it will try to index the cleartext if
125 a stashed session key is already known for the message (e.g.
126 from a previous copy), but will not try to access your secret
127 keys. Use false to avoid decrypting even when a stashed session
128 key is already present.
129
130 nostash is the same as true except that it will not stash
131 newly-discovered session keys in the database.
132
133 From the command line (i.e. during notmuch-new, notmuch-insert,
134 or notmuch-reindex), the user can override the database's stored
135 decryption policy with the --decrypt= option.
136
137 Here is a table that summarizes the functionality of each of
138 these policies:
139
140 ┌──────────────┬───────┬──────┬─────────┬──────┐
141 │ │ false │ auto │ nostash │ true │
142 ├──────────────┼───────┼──────┼─────────┼──────┤
143 │Index cleart‐ │ │ X │ X │ X │
144 │ext using │ │ │ │ │
145 │stashed ses‐ │ │ │ │ │
146 │sion keys │ │ │ │ │
147 ├──────────────┼───────┼──────┼─────────┼──────┤
148 │Index cleart‐ │ │ │ X │ X │
149 │ext using se‐ │ │ │ │ │
150 │cret keys │ │ │ │ │
151 ├──────────────┼───────┼──────┼─────────┼──────┤
152 │Stash session │ │ │ │ X │
153 │keys │ │ │ │ │
154 ├──────────────┼───────┼──────┼─────────┼──────┤
155 │Delete │ X │ │ │ │
156 │stashed ses‐ │ │ │ │ │
157 │sion keys on │ │ │ │ │
158 │reindex │ │ │ │ │
159 └──────────────┴───────┴──────┴─────────┴──────┘
160
161 Stashed session keys are kept in the database as properties as‐
162 sociated with the message. See session-key in
163 notmuch-properties for more details about how they can be use‐
164 ful.
165
166 Be aware that the notmuch index is likely sufficient (and a
167 stashed session key is certainly sufficient) to reconstruct the
168 cleartext of the message itself, so please ensure that the not‐
169 much message index is adequately protected. DO NOT USE in‐
170 dex.decrypt=true or index.decrypt=nostash without considering
171 the security of your index.
172
173 Default: auto.
174
175 index.header.<prefix>
176 Define the query prefix <prefix>, based on a mail header. For
177 example index.header.List=List-Id will add a probabilistic pre‐
178 fix List: that searches the List-Id field. User defined pre‐
179 fixes must not start with 'a'...'z'; in particular adding a pre‐
180 fix with same name as a predefined prefix is not supported. See
181 notmuch-search-terms for a list of existing prefixes, and an ex‐
182 planation of probabilistic prefixes.
183
184 maildir.synchronize_flags
185 If true, then the following maildir flags (in message filenames)
186 will be synchronized with the corresponding notmuch tags:
187
188 ┌─────┬────────────────────────────┐
189 │Flag │ Tag │
190 ├─────┼────────────────────────────┤
191 │D │ draft │
192 ├─────┼────────────────────────────┤
193 │F │ flagged │
194 ├─────┼────────────────────────────┤
195 │P │ passed │
196 └─────┴────────────────────────────┘
197
198
199 │R │ replied │
200 ├─────┼────────────────────────────┤
201 │S │ unread (added when 'S' │
202 │ │ flag is not present) │
203 └─────┴────────────────────────────┘
204
205 The notmuch-new command will notice flag changes in filenames
206 and update tags, while the notmuch-tag and notmuch-restore com‐
207 mands will notice tag changes and update flags in filenames.
208
209 If there have been any changes in the maildir (new messages
210 added, old ones removed or renamed, maildir flags changed,
211 etc.), it is advisable to run notmuch-new before notmuch-tag or
212 notmuch-restore commands to ensure the tag changes are properly
213 synchronized to the maildir flags, as the commands expect the
214 database and maildir to be in sync.
215
216 Default: true.
217
218 new.ignore
219 A list to specify files and directories that will not be
220 searched for messages by notmuch-new. Each entry in the list is
221 either:
222
223 A file or a directory name, without path, that will be ignored,
224 regardless of the location in the mail store directory hierar‐
225 chy.
226
227 Or:
228
229 A regular expression delimited with // that will be matched
230 against the path of the file or directory relative to the data‐
231 base path. Matching files and directories will be ignored. The
232 beginning and end of string must be explicitly anchored. For ex‐
233 ample, /.*/foo$/ would match "bar/foo" and "bar/baz/foo", but
234 not "foo" or "bar/foobar".
235
236 Default: empty list.
237
238 new.tags
239 A list of tags that will be added to all messages incorporated
240 by notmuch new.
241
242 Default: unread;inbox.
243
244 query.<name>
245 Expansion for named query called <name>. See
246 notmuch-search-terms for more information about named queries.
247
248 search.exclude_tags
249 A list of tags that will be excluded from search results by de‐
250 fault. Using an excluded tag in a query will override that ex‐
251 clusion.
252
253 Default: empty list. Note that notmuch puts deleted;spam here
254 when creating new configuration file.
255
256 show.extra_headers
257 By default notmuch-show includes the following headers in struc‐
258 tured output if they are present in the message: Subject, From,
259 To, Cc, Bcc, Reply-To, Date. This option allows the specifica‐
260 tion of a list of further headers to output.
261
262 History: This configuration value was introduced in notmuch
263 0.35.
264
265 Default: empty list.
266
267 squery.<name>
268 Expansion for named query called <name>, using s-expression syn‐
269 tax. See notmuch-sexp-queries for more information about s-ex‐
270 pression queries.
271
272 user.name
273 Your full name.
274
275 Default: $NAME variable if set, otherwise read from /etc/passwd.
276
277 user.other_email
278 A list of other email addresses at which you receive email (see
279 also, user.primary_email)
280
281 Default: not set.
282
283 user.primary_email
284 Your primary email address.
285
286 Default: $EMAIL variable if set, otherwise constructed from the
287 username and hostname of the current machine.
288
290 CONFIGURATION
291 Notmuch configuration file search order:
292
293 1. File specified by notmuch --config global option; see notmuch.
294
295 2. File specified by NOTMUCH_CONFIG environment variable.
296
297 3. $XDG_CONFIG_HOME/notmuch/<profile>/config where <profile> is defined
298 by NOTMUCH_PROFILE environment variable if set, $XDG_CON‐
299 FIG_HOME/notmuch/default/config otherwise.
300
301 4. $HOME/.notmuch-config.<profile> where <profile> is defined by
302 NOTMUCH_PROFILE environment variable if set, $HOME/.notmuch-config
303 otherwise.
304
305 DATABASE LOCATION
306 Notmuch database search order:
307
308 1. Directory specified by NOTMUCH_DATABASE environment variable.
309
310 2. Directory specified by config key database.path.
311
312 3. $XDG_DATA_HOME/notmuch/<profile> where <profile> is defined by
313 NOTMUCH_PROFILE environment variable if set, $XDG_DATA_HOME/not‐
314 much/default otherwise.
315
316 4. Directory specified by MAILDIR environment variable.
317
318 5. $HOME/mail
319
320 HOOKS
321 Notmuch hook directory search order:
322
323 1. Directory specified by database.hook_dir configuration option.
324
325 2. $XDG_CONFIG_HOME/notmuch/<profile>/hooks where <profile> is defined
326 by NOTMUCH_PROFILE environment variable if set, $XDG_CON‐
327 FIG_HOME/notmuch/default/hooks otherwise.
328
329 3. <database.path>/.notmuch/hooks
330
332 notmuch, notmuch-count, notmuch-dump, notmuch-hooks, notmuch-insert,
333 notmuch-new, notmuch-properties, notmuch-reply, notmuch-restore,
334 notmuch-search, notmuch-search-terms, notmuch-show, notmuch-tag
335
337 Carl Worth and many others
338
340 2009-2023, Carl Worth and many others
341
342
343
344
3450.38 Sep 12, 2023 NOTMUCH-CONFIG(1)