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