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