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