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