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