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