]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-config.rst
3ba849b2e42b972a0dc952596ff17eeb9c7837c2
[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 Items marked **[STORED IN DATABASE]** are only in the database.  They
21 should not be placed in the configuration file, and should be accessed
22 programmatically as described in the SYNOPSIS above.
23
24     **get**
25         The value of the specified configuration item is printed to
26         stdout. If the item has multiple values (it is a list), each
27         value is separated by a newline character.
28
29     **set**
30         The specified configuration item is set to the given value. To
31         specify a multiple-value item (a list), provide each value as a
32         separate command-line argument.
33
34         If no values are provided, the specified configuration item will
35         be removed from the configuration file.
36
37     **list**
38         Every configuration item is printed to stdout, each on a
39         separate 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.
48
49     **database.path**
50         The top-level directory where your mail currently exists and to
51         where mail will be delivered in the future. Files should be
52         individual email messages. Notmuch will store its database
53         within a sub-directory of the path configured here named
54         ``.notmuch``.
55
56         Default: ``$MAILDIR`` variable if set, otherwise ``$HOME/mail``.
57
58     **user.name**
59         Your full name.
60
61         Default: ``$NAME`` variable if set, otherwise read from
62         ``/etc/passwd``.
63
64     **user.primary\_email**
65         Your primary email address.
66
67         Default: ``$EMAIL`` variable if set, otherwise constructed from the
68         username and hostname of the current machine.
69
70     **user.other\_email**
71         A list of other email addresses at which you receive email.
72
73         Default: not set.
74
75     **new.tags**
76         A list of tags that will be added to all messages incorporated
77         by **notmuch new**.
78
79         Default: ``unread;inbox``.
80
81     **new.ignore**
82         A list of file and directory names, without path, that will not
83         be searched for messages by **notmuch new**. All the files and
84         directories matching any of the names specified here will be
85         ignored, regardless of the location in the mail store directory
86         hierarchy.
87
88         Default: empty list.
89
90     **search.exclude\_tags**
91         A list of tags that will be excluded from search results by
92         default. Using an excluded tag in a query will override that
93         exclusion.
94
95         Default: empty list. Note that **notmuch-setup(1)** puts
96         ``deleted;spam`` here when creating new configuration file.
97
98
99
100     **maildir.synchronize\_flags**
101         If true, then the following maildir flags (in message filenames)
102         will be synchronized with the corresponding notmuch tags:
103
104         +--------+-----------------------------------------------+
105         | Flag   | Tag                                           |
106         +========+===============================================+
107         | D      | draft                                         |
108         +--------+-----------------------------------------------+
109         | F      | flagged                                       |
110         +--------+-----------------------------------------------+
111         | P      | passed                                        |
112         +--------+-----------------------------------------------+
113         | R      | replied                                       |
114         +--------+-----------------------------------------------+
115         | S      | unread (added when 'S' flag is not present)   |
116         +--------+-----------------------------------------------+
117
118         The **notmuch new** command will notice flag changes in
119         filenames and update tags, while the **notmuch tag** and
120         **notmuch restore** commands will notice tag changes and update
121         flags in filenames.
122
123         If there have been any changes in the maildir (new messages
124         added, old ones removed or renamed, maildir flags changed,
125         etc.), it is advisable to run **notmuch new** before **notmuch
126         tag** or **notmuch restore** commands to ensure the tag changes
127         are properly synchronized to the maildir flags, as the commands
128         expect the database and maildir to be in sync.
129
130         Default: ``true``.
131
132     **crypto.gpg_path**
133
134         Name (or full path) of gpg binary to use in verification and
135         decryption of PGP/MIME messages.  NOTE: This configuration
136         item is deprecated, and will be ignored if notmuch is built
137         against GMime 3.0 or later.
138
139         Default: ``gpg``.
140
141     **index.decrypt**
142
143         **[STORED IN DATABASE]**
144
145         Policy for decrypting encrypted messages during indexing.
146         Must be one of: ``false``, ``auto``, ``nostash``, or
147         ``true``.
148
149         When indexing an encrypted e-mail message, if this variable is
150         set to ``true``, notmuch will try to decrypt the message and
151         index the cleartext, stashing a copy of any discovered session
152         keys for the message.  If ``auto``, it will try to index the
153         cleartext if a stashed session key is already known for the message
154         (e.g. from a previous copy), but will not try to access your
155         secret keys.  Use ``false`` to avoid decrypting even when a
156         stashed session key is already present.
157
158         ``nostash`` is the same as ``true`` except that it will not
159         stash newly-discovered session keys in the database.
160
161         From the command line (i.e. during **notmuch-new(1)**,
162         **notmuch-insert(1)**, or **notmuch-reindex(1)**), the user
163         can override the database's stored decryption policy with the
164         ``--decrypt=`` option.
165
166         Here is a table that summarizes the functionality of each of
167         these policies:
168
169         +------------------------+-------+------+---------+------+
170         |                        | false | auto | nostash | true |
171         +========================+=======+======+=========+======+
172         | Index cleartext using  |       |  X   |    X    |  X   |
173         | stashed session keys   |       |      |         |      |
174         +------------------------+-------+------+---------+------+
175         | Index cleartext        |       |      |    X    |  X   |
176         | using secret keys      |       |      |         |      |
177         +------------------------+-------+------+---------+------+
178         | Stash session keys     |       |      |         |  X   |
179         +------------------------+-------+------+---------+------+
180         | Delete stashed session |   X   |      |         |      |
181         | keys on reindex        |       |      |         |      |
182         +------------------------+-------+------+---------+------+
183
184         Stashed session keys are kept in the database as properties
185         associated with the message.  See ``session-key`` in
186         **notmuch-properties(7)** for more details about how they can
187         be useful.
188
189         Be aware that the notmuch index is likely sufficient (and a
190         stashed session key is certainly sufficient) to reconstruct
191         the cleartext of the message itself, so please ensure that the
192         notmuch message index is adequately protected.  DO NOT USE
193         ``index.decrypt=true`` or ``index.decrypt=nostash`` without
194         considering the security of your index.
195
196         Default: ``auto``.
197
198     **built_with.<name>**
199
200         Compile time feature <name>. Current possibilities include
201         "compact" (see **notmuch-compact(1)**)
202         and "field_processor" (see **notmuch-search-terms(7)**).
203
204     **query.<name>**
205
206         **[STORED IN DATABASE]**
207         Expansion for named query called <name>. See
208         **notmuch-search-terms(7)** for more information about named
209         queries.
210
211 ENVIRONMENT
212 ===========
213
214 The following environment variables can be used to control the behavior
215 of notmuch.
216
217 **NOTMUCH\_CONFIG**
218     Specifies the location of the notmuch configuration file. Notmuch
219     will use ${HOME}/.notmuch-config if this variable is not set.
220
221 SEE ALSO
222 ========
223
224 **notmuch(1)**,
225 **notmuch-count(1)**,
226 **notmuch-dump(1)**,
227 **notmuch-hooks(5)**,
228 **notmuch-insert(1)**,
229 **notmuch-new(1)**,
230 **notmuch-reply(1)**,
231 **notmuch-restore(1)**,
232 **notmuch-search(1)**,
233 **notmuch-search-terms(7)**,
234 **notmuch-properties(7)**,
235 **notmuch-show(1)**,
236 **notmuch-tag(1)**