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