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