1 <h1>NOTMUCH-CONFIG(1)</h1>
5 notmuch-config - access notmuch configuration file
10 <b>notmuch</b> <b>config</b> <b>get</b> <<u>section</u>>.<<u>item</u>>
12 <b>notmuch</b> <b>config</b> <b>set</b> <<u>section</u>>.<<u>item</u>> [<u>value</u> ...]
14 <b>notmuch</b> <b>config</b> <b>list</b>
19 The <b>config</b> command can be used to get or set settings in the notmuch
20 configuration file and corresponding database.
22 Items marked <b>[STORED</b> <b>IN</b> <b>DATABASE]</b> are only in the database. They
23 should not be placed in the configuration file, and should be accessed
24 programmatically as described in the SYNOPSIS above.
26 <b>get</b> The value of the specified configuration item is printed to std‐
27 out. If the item has multiple values (it is a list), each value
28 is separated by a newline character.
30 <b>set</b> The specified configuration item is set to the given value. To
31 specify a multiple-value item (a list), provide each value as a
32 separate command-line argument.
34 If no values are provided, the specified configuration item will
35 be removed from the configuration file.
37 <b>list</b> Every configuration item is printed to stdout, each on a sepa‐
38 rate line of the form:
40 *section*.\ *item*\ =\ *value*
42 No additional whitespace surrounds the dot or equals sign char‐
43 acters. In a multiple-value item (a list), the values are sepa‐
44 rated by semicolon characters.
46 The available configuration items are described below.
49 The top-level directory where your mail currently exists and to
50 where mail will be delivered in the future. Files should be
51 individual email messages. Notmuch will store its database
52 within a sub-directory of the path configured here named <b>.not-</b>
55 Default: <b>$MAILDIR</b> variable if set, otherwise <b>$HOME/mail</b>.
60 Default: <b>$NAME</b> variable if set, otherwise read from <b>/etc/passwd</b>.
62 <b>user.primary</b>_<b>email</b>
63 Your primary email address.
65 Default: <b>$EMAIL</b> variable if set, otherwise constructed from the
66 username and hostname of the current machine.
68 <b>user.other</b>_<b>email</b>
69 A list of other email addresses at which you receive email.
74 A list of tags that will be added to all messages incorporated
75 by <b>notmuch</b> <b>new</b>.
77 Default: <b>unread;inbox</b>.
80 A list to specify files and directories that will not be
81 searched for messages by <b>notmuch</b> <b>new</b>. Each entry in the list is
84 A file or a directory name, without path, that will be ignored,
85 regardless of the location in the mail store directory hierar‐
90 A regular expression delimited with // that will be matched
91 against the path of the file or directory relative to the data‐
92 base path. Matching files and directories will be ignored. The
93 beginning and end of string must be explicitly anchored. For
94 example, /.*/foo$/ would match "bar/foo" and "bar/baz/foo", but
95 not "foo" or "bar/foobar".
99 <b>search.exclude</b>_<b>tags</b>
100 A list of tags that will be excluded from search results by
101 default. Using an excluded tag in a query will override that
104 Default: empty list. Note that <b>notmuch-setup</b>(1) puts
105 <b>deleted;spam</b> here when creating new configuration file.
107 <b>maildir.synchronize</b>_<b>flags</b>
108 If true, then the following maildir flags (in message filenames)
109 will be synchronized with the corresponding notmuch tags:
111 ┌─────┬────────────────────────────┐
113 ├─────┼────────────────────────────┤
115 ├─────┼────────────────────────────┤
117 ├─────┼────────────────────────────┤
119 ├─────┼────────────────────────────┤
121 ├─────┼────────────────────────────┤
122 │S │ unread (added when 'S' │
123 │ │ flag is not present) │
124 └─────┴────────────────────────────┘
126 The <b>notmuch</b> <b>new</b> command will notice flag changes in filenames
127 and update tags, while the <b>notmuch</b> <b>tag</b> and <b>notmuch</b> <b>restore</b> com‐
128 mands will notice tag changes and update flags in filenames.
130 If there have been any changes in the maildir (new messages
131 added, old ones removed or renamed, maildir flags changed,
132 etc.), it is advisable to run <b>notmuch</b> <b>new</b> before <b>notmuch</b> <b>tag</b> or
133 <b>notmuch</b> <b>restore</b> commands to ensure the tag changes are properly
134 synchronized to the maildir flags, as the commands expect the
135 database and maildir to be in sync.
137 Default: <b>true</b>.
139 <b>crypto.gpg</b>_<b>path</b>
140 Name (or full path) of gpg binary to use in verification and
141 decryption of PGP/MIME messages. NOTE: This configuration item
142 is deprecated, and will be ignored if notmuch is built against
147 <b>index.decrypt</b> <b>[STORED</b> <b>IN</b> <b>DATABASE]</b>
148 Policy for decrypting encrypted messages during indexing. Must
149 be one of: <b>false</b>, <b>auto</b>, <b>nostash</b>, or <b>true</b>.
151 When indexing an encrypted e-mail message, if this variable is
152 set to <b>true</b>, notmuch will try to decrypt the message and index
153 the cleartext, stashing a copy of any discovered session keys
154 for the message. If <b>auto</b>, it will try to index the cleartext if
155 a stashed session key is already known for the message (e.g.
156 from a previous copy), but will not try to access your secret
157 keys. Use <b>false</b> to avoid decrypting even when a stashed session
158 key is already present.
160 <b>nostash</b> is the same as <b>true</b> except that it will not stash
161 newly-discovered session keys in the database.
163 From the command line (i.e. during <a href='../notmuch-new-1/'>notmuch-new</a>(1), <a href='../notmuch-insert-1/'>not‐</a>
164 <a href='../notmuch-insert-1/'>much-insert</a>(1), or <a href='../notmuch-reindex-1/'>notmuch-reindex</a>(1)), the user can override
165 the database's stored decryption policy with the <b>--decrypt=</b>
168 Here is a table that summarizes the functionality of each of
171 ┌──────────────┬───────┬──────┬─────────┬──────┐
172 │ │ false │ auto │ nostash │ true │
173 ├──────────────┼───────┼──────┼─────────┼──────┤
174 │Index cleart‐ │ │ X │ X │ X │
176 │stashed ses‐ │ │ │ │ │
178 ├──────────────┼───────┼──────┼─────────┼──────┤
179 │Index cleart‐ │ │ │ X │ X │
181 │secret keys │ │ │ │ │
182 ├──────────────┼───────┼──────┼─────────┼──────┤
183 │Stash session │ │ │ │ X │
185 ├──────────────┼───────┼──────┼─────────┼──────┤
187 │stashed ses‐ │ │ │ │ │
188 │sion keys on │ │ │ │ │
190 └──────────────┴───────┴──────┴─────────┴──────┘
192 Stashed session keys are kept in the database as properties
193 associated with the message. See <b>session-key</b> in <a href='../notmuch-properties-7/'>notmuch-proper‐</a>
194 <a href='../notmuch-properties-7/'>ties</a>(7) for more details about how they can be useful.
196 Be aware that the notmuch index is likely sufficient (and a
197 stashed session key is certainly sufficient) to reconstruct the
198 cleartext of the message itself, so please ensure that the not‐
199 much message index is adequately protected. DO NOT USE
200 <b>index.decrypt=true</b> or <b>index.decrypt=nostash</b> without considering
201 the security of your index.
203 Default: <b>auto</b>.
205 <b>index.header.<prefix></b> <b>[STORED</b> <b>IN</b> <b>DATABASE]</b>
206 Define the query prefix <prefix>, based on a mail header. For
207 example <b>index.header.List=List-Id</b> will add a probabilistic pre‐
208 fix <b>List:</b> that searches the <b>List-Id</b> field. User defined pre‐
209 fixes must not start with 'a'...'z'; in particular adding a pre‐
210 fix with same name as a predefined prefix is not supported. See
211 <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7) for a list of existing prefixes, and an
212 explanation of probabilistic prefixes.
214 <b>built</b>_<b>with.<name></b>
215 Compile time feature <name>. Current possibilities include "com‐
216 pact" (see <a href='../notmuch-compact-1/'>notmuch-compact</a>(1)) and "field_processor" (see <a href='../notmuch-search-terms-7/'>not‐</a>
217 <a href='../notmuch-search-terms-7/'>much-search-terms</a>(7)).
219 <b>query.<name></b> <b>[STORED</b> <b>IN</b> <b>DATABASE]</b>
220 Expansion for named query called <name>. See <a href='../notmuch-search-terms-7/'>not‐</a>
221 <a href='../notmuch-search-terms-7/'>much-search-terms</a>(7) for more information about named queries.
226 The following environment variables can be used to control the behavior
229 <b>NOTMUCH</b>_<b>CONFIG</b>
230 Specifies the location of the notmuch configuration file. Not‐
231 much will use ${HOME}/.notmuch-config if this variable is not
237 <a href='../notmuch-1/'>notmuch</a>(1), <a href='../notmuch-count-1/'>notmuch-count</a>(1), <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>notmuch-hooks</a>(5), <a href='../notmuch-insert-1/'>not‐</a>
238 <a href='../notmuch-insert-1/'>much-insert</a>(1), <a href='../notmuch-new-1/'>notmuch-new</a>(1), <a href='../notmuch-reply-1/'>notmuch-reply</a>(1), <a href='../notmuch-restore-1/'>notmuch-restore</a>(1),
239 <a href='../notmuch-search-1/'>notmuch-search</a>(1), <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7), <a href='../notmuch-properties-7/'>notmuch-properties</a>(7), <a href='../notmuch-show-1/'>not‐</a>
240 <a href='../notmuch-show-1/'>much-show</a>(1), <a href='../notmuch-tag-1/'>notmuch-tag</a>(1)
245 Carl Worth and many others
250 2009-2019, Carl Worth and many others