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 database.path
47 Notmuch will store its database here, (in sub-directory named
48 .notmuch if database.mail_root is unset).
49
50 Default: see DATABASE LOCATION
51
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 in‐
55 dividual email messages.
56
57 History: this configuration value was introduced in notmuch
58 0.32.
59
60 Default: For compatibility with older configurations, the value
61 of database.path is used if database.mail_root is unset.
62
63 database.backup_dir
64 Directory to store tag dumps when upgrading database.
65
66 History: this configuration value was introduced in notmuch
67 0.32.
68
69 Default: A sibling directory of the Xapian database called back‐
70 ups.
71
72 database.hook_dir
73 Directory containing hooks run by notmuch commands. See not‐
74 much-hooks(5).
75
76 History: this configuration value was introduced in notmuch
77 0.32.
78
79 Default: See HOOKS, below.
80
81 database.autocommit
82 How often to commit transactions to disk. 0 means wait until command
83 completes, otherwise an integer n specifies to commit to disk after
84 every n completed transactions.
85
86 History: this configuration value was introduced in notmuch 0.33.
87
88 user.name
89 Your full name.
90
91 Default: $NAME variable if set, otherwise read from /etc/passwd.
92
93 user.primary_email
94 Your primary email address.
95
96 Default: $EMAIL variable if set, otherwise constructed from the
97 username and hostname of the current machine.
98
99 user.other_email
100 A list of other email addresses at which you receive email.
101
102 Default: not set.
103
104 new.tags
105 A list of tags that will be added to all messages incorporated
106 by notmuch new.
107
108 Default: unread;inbox.
109
110 new.ignore
111 A list to specify files and directories that will not be
112 searched for messages by notmuch-new(1). Each entry in the list
113 is either:
114
115 A file or a directory name, without path, that will be ignored,
116 regardless of the location in the mail store directory hierar‐
117 chy.
118
119 Or:
120
121 A regular expression delimited with // that will be matched
122 against the path of the file or directory relative to the data‐
123 base path. Matching files and directories will be ignored. The
124 beginning and end of string must be explicitly anchored. For ex‐
125 ample, /.*/foo$/ would match "bar/foo" and "bar/baz/foo", but
126 not "foo" or "bar/foobar".
127
128 Default: empty list.
129
130 search.exclude_tags
131 A list of tags that will be excluded from search results by de‐
132 fault. Using an excluded tag in a query will override that ex‐
133 clusion.
134
135 Default: empty list. Note that notmuch-setup(1) puts
136 deleted;spam here when creating new configuration file.
137
138 maildir.synchronize_flags
139 If true, then the following maildir flags (in message filenames)
140 will be synchronized with the corresponding notmuch tags:
141
142 ┌─────┬────────────────────────────┐
143 │Flag │ Tag │
144 ├─────┼────────────────────────────┤
145 │D │ draft │
146 ├─────┼────────────────────────────┤
147 │F │ flagged │
148 ├─────┼────────────────────────────┤
149 │P │ passed │
150 ├─────┼────────────────────────────┤
151 │R │ replied │
152 ├─────┼────────────────────────────┤
153 │S │ unread (added when 'S' │
154 │ │ flag is not present) │
155 └─────┴────────────────────────────┘
156
157 The notmuch-new(1) command will notice flag changes in filenames
158 and update tags, while the notmuch-tag(1) and notmuch-restore(1)
159 commands will notice tag changes and update flags in filenames.
160
161 If there have been any changes in the maildir (new messages
162 added, old ones removed or renamed, maildir flags changed,
163 etc.), it is advisable to run notmuch-new(1) before not‐
164 much-tag(1) or notmuch-restore(1) commands to ensure the tag
165 changes are properly synchronized to the maildir flags, as the
166 commands expect the database and maildir to be in sync.
167
168 Default: true.
169
170 index.decrypt
171 Policy for decrypting encrypted messages during indexing. Must
172 be one of: false, auto, nostash, or true.
173
174 When indexing an encrypted e-mail message, if this variable is
175 set to true, notmuch will try to decrypt the message and index
176 the cleartext, stashing a copy of any discovered session keys
177 for the message. If auto, it will try to index the cleartext if
178 a stashed session key is already known for the message (e.g.
179 from a previous copy), but will not try to access your secret
180 keys. Use false to avoid decrypting even when a stashed session
181 key is already present.
182
183 nostash is the same as true except that it will not stash
184 newly-discovered session keys in the database.
185
186 From the command line (i.e. during notmuch-new(1), notmuch-in‐
187 sert(1), or notmuch-reindex(1)), the user can override the data‐
188 base's stored decryption policy with the --decrypt= option.
189
190 Here is a table that summarizes the functionality of each of
191 these policies:
192
193 ┌──────────────┬───────┬──────┬─────────┬──────┐
194 │ │ false │ auto │ nostash │ true │
195 └──────────────┴───────┴──────┴─────────┴──────┘
196
197
198
199 │Index cleart‐ │ │ X │ X │ X │
200 │ext using │ │ │ │ │
201 │stashed ses‐ │ │ │ │ │
202 │sion keys │ │ │ │ │
203 ├──────────────┼───────┼──────┼─────────┼──────┤
204 │Index cleart‐ │ │ │ X │ X │
205 │ext using se‐ │ │ │ │ │
206 │cret keys │ │ │ │ │
207 ├──────────────┼───────┼──────┼─────────┼──────┤
208 │Stash session │ │ │ │ X │
209 │keys │ │ │ │ │
210 ├──────────────┼───────┼──────┼─────────┼──────┤
211 │Delete │ X │ │ │ │
212 │stashed ses‐ │ │ │ │ │
213 │sion keys on │ │ │ │ │
214 │reindex │ │ │ │ │
215 └──────────────┴───────┴──────┴─────────┴──────┘
216
217 Stashed session keys are kept in the database as properties as‐
218 sociated with the message. See session-key in notmuch-proper‐
219 ties(7) for more details about how they can be useful.
220
221 Be aware that the notmuch index is likely sufficient (and a
222 stashed session key is certainly sufficient) to reconstruct the
223 cleartext of the message itself, so please ensure that the not‐
224 much message index is adequately protected. DO NOT USE in‐
225 dex.decrypt=true or index.decrypt=nostash without considering
226 the security of your index.
227
228 Default: auto.
229
230 index.header.<prefix>
231 Define the query prefix <prefix>, based on a mail header. For
232 example index.header.List=List-Id will add a probabilistic pre‐
233 fix List: that searches the List-Id field. User defined pre‐
234 fixes must not start with 'a'...'z'; in particular adding a pre‐
235 fix with same name as a predefined prefix is not supported. See
236 notmuch-search-terms(7) for a list of existing prefixes, and an
237 explanation of probabilistic prefixes.
238
239 built_with.<name>
240 Compile time feature <name>. Current possibilities include
241 "retry_lock" (configure option, included by default). (since
242 notmuch 0.30, "compact" and "field_processor" are always in‐
243 cluded.)
244
245 query.<name>
246 Expansion for named query called <name>. See not‐
247 much-search-terms(7) for more information about named queries.
248
249 squery.<name>
250 Expansion for named query called <name>, using s-expression syn‐
251 tax. See notmuch-sexp-queries(7) for more information about
252 s-expression queries.
253
255 CONFIGURATION
256 Notmuch configuration file search order:
257
258 1. File specified by notmuch --config global option; see notmuch(1).
259
260 2. File specified by NOTMUCH_CONFIG environment variable.
261
262 3. $XDG_CONFIG_HOME/notmuch/<profile>/config where <profile> is defined
263 by NOTMUCH_PROFILE environment variable if set, $XDG_CON‐
264 FIG_HOME/notmuch/default/config otherwise.
265
266 4. $HOME/.notmuch-config.<profile> where <profile> is defined by NOT‐
267 MUCH_PROFILE environment variable if set, $HOME/.notmuch-config oth‐
268 erwise.
269
270 DATABASE LOCATION
271 Notmuch database search order:
272
273 1. Directory specified by NOTMUCH_DATABASE environment variable.
274
275 2. Directory specified by config key database.path.
276
277 3. $XDG_DATA_HOME/notmuch/<profile> where <profile> is defined by NOT‐
278 MUCH_PROFILE environment variable if set, $XDG_DATA_HOME/notmuch/de‐
279 fault otherwise.
280
281 4. Directory specified by MAILDIR environment variable.
282
283 5. $HOME/mail
284
285 HOOKS
286 Notmuch hook directory search order:
287
288 1. Directory specified by database.hook_dir configuration option.
289
290 2. $XDG_CONFIG_HOME/notmuch/<profile>/hooks where <profile> is defined
291 by NOTMUCH_PROFILE environment variable if set, $XDG_CON‐
292 FIG_HOME/notmuch/default/hooks otherwise.
293
294 3. <database.path>/.notmuch/hooks
295
297 notmuch(1), notmuch-count(1), notmuch-dump(1), notmuch-hooks(5), not‐
298 much-insert(1), notmuch-new(1), notmuch-properties(7), notmuch-re‐
299 ply(1), notmuch-restore(1), notmuch-search(1), notmuch-search-terms(7),
300 notmuch-show(1), notmuch-tag(1)
301
303 Carl Worth and many others
304
306 2009-2021, Carl Worth and many others
307
308
309
310
3110.34.1 Nov 03, 2021 NOTMUCH-CONFIG(1)