1NOTMUCH-CONFIG(1)                   notmuch                  NOTMUCH-CONFIG(1)
2
3
4

NAME

6       notmuch-config - access notmuch configuration file
7

SYNOPSIS

9       notmuch config get <section>.<item>
10
11       notmuch config set [--database] <section>.<item> [value ...]
12
13       notmuch config list
14

DESCRIPTION

16       The  config  command  can be used to get or set settings in the notmuch
17       configuration file and corresponding database.
18
19       get    The value of the specified configuration item is printed to std‐
20              out.  If the item has multiple values (it is a list), each value
21              is separated by a newline character.
22
23       set    The specified configuration item is set to the given  value.  To
24              specify  a multiple-value item (a list), provide each value as a
25              separate command-line argument.
26
27              If no values are provided, the specified configuration item will
28              be removed from the configuration file.
29
30              With  the  --database  option,  updates  configuration  metadata
31              stored in the database, rather than the default (text)  configu‐
32              ration file.
33
34       list   Every  configuration  item is printed to stdout, each on a sepa‐
35              rate line of the form:
36
37                 section.item=value
38
39              No additional whitespace surrounds the dot or equals sign  char‐
40              acters.  In a multiple-value item (a list), the values are sepa‐
41              rated by semicolon characters.
42
43       The available configuration items  are  described  below.  Non-absolute
44       paths are presumed relative to $HOME for items in section database.
45
46       database.path
47              Notmuch  will  store  its database here, (in sub-directory named
48              .notmuch if database.mail_root 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 in‐
55              dividual email messages.
56
57              History: this configuration  value  was  introduced  in  notmuch
58              0.32.
59
60              Default:  For compatibility with older configurations, the value
61              of database.path is used if database.mail_root is unset.
62
63       database.backup_dir
64              Directory to store tag dumps when upgrading database.
65
66              History: this configuration  value  was  introduced  in  notmuch
67              0.32.
68
69              Default: A sibling directory of the Xapian database called back‐
70              ups.
71
72       database.hook_dir
73          Directory  containing  hooks  run  by  notmuch  commands.  See  not‐
74          much-hooks(5).
75
76       user.name
77              Your full name.
78
79              Default: $NAME variable if set, otherwise read from /etc/passwd.
80
81       user.primary_email
82              Your primary email address.
83
84              Default:  $EMAIL variable if set, otherwise constructed from the
85              username and hostname of the current machine.
86
87       user.other_email
88              A list of other email addresses at which you receive email.
89
90              Default: not set.
91
92       new.tags
93              A list of tags that will be added to all  messages  incorporated
94              by notmuch new.
95
96              Default: unread;inbox.
97
98       new.ignore
99              A  list  to  specify  files  and  directories  that  will not be
100              searched for messages by notmuch new. Each entry in the list  is
101              either:
102
103              A  file or a directory name, without path, that will be ignored,
104              regardless of the location in the mail store  directory  hierar‐
105              chy.
106
107              Or:
108
109              A  regular  expression  delimited  with  // that will be matched
110              against the path of the file or directory relative to the  data‐
111              base  path.  Matching files and directories will be ignored. The
112              beginning and end of string must be explicitly anchored. For ex‐
113              ample,  /.*/foo$/  would  match "bar/foo" and "bar/baz/foo", but
114              not "foo" or "bar/foobar".
115
116              Default: empty list.
117
118       search.exclude_tags
119              A list of tags that will be excluded from search results by  de‐
120              fault.  Using  an excluded tag in a query will override that ex‐
121              clusion.
122
123              Default:   empty   list.   Note   that   notmuch-setup(1)   puts
124              deleted;spam here when creating new configuration file.
125
126       maildir.synchronize_flags
127              If true, then the following maildir flags (in message filenames)
128              will be synchronized with the corresponding notmuch tags:
129
130
131
132
133                            ┌─────┬────────────────────────────┐
134                            │Flag │ Tag                        │
135                            ├─────┼────────────────────────────┤
136                            │D    │ draft                      │
137                            ├─────┼────────────────────────────┤
138                            │F    │ flagged                    │
139                            ├─────┼────────────────────────────┤
140                            │P    │ passed                     │
141                            ├─────┼────────────────────────────┤
142                            │R    │ replied                    │
143                            ├─────┼────────────────────────────┤
144                            │S    │ unread  (added  when   'S' │
145                            │     │ flag is not present)       │
146                            └─────┴────────────────────────────┘
147
148              The  notmuch  new  command will notice flag changes in filenames
149              and update tags, while the notmuch tag and notmuch restore  com‐
150              mands will notice tag changes and update flags in filenames.
151
152              If  there  have  been  any  changes in the maildir (new messages
153              added, old ones  removed  or  renamed,  maildir  flags  changed,
154              etc.),  it is advisable to run notmuch new before notmuch tag or
155              notmuch restore commands to ensure the tag changes are  properly
156              synchronized  to  the  maildir flags, as the commands expect the
157              database and maildir to be in sync.
158
159              Default: true.
160
161       index.decrypt
162              Policy for decrypting encrypted messages during indexing.   Must
163              be one of: false, auto, nostash, or true.
164
165              When  indexing  an encrypted e-mail message, if this variable is
166              set to true, notmuch will try to decrypt the message  and  index
167              the  cleartext,  stashing  a copy of any discovered session keys
168              for the message.  If auto, it will try to index the cleartext if
169              a  stashed  session  key  is already known for the message (e.g.
170              from a previous copy), but will not try to  access  your  secret
171              keys.  Use false to avoid decrypting even when a stashed session
172              key is already present.
173
174              nostash is the same as  true  except  that  it  will  not  stash
175              newly-discovered session keys in the database.
176
177              From  the  command line (i.e. during notmuch-new(1), notmuch-in‐
178              sert(1), or notmuch-reindex(1)), the user can override the data‐
179              base's stored decryption policy with the --decrypt= option.
180
181              Here  is  a  table  that summarizes the functionality of each of
182              these policies:
183
184                      ┌──────────────┬───────┬──────┬─────────┬──────┐
185                      │              │ false │ auto │ nostash │ true │
186                      ├──────────────┼───────┼──────┼─────────┼──────┤
187                      │Index cleart‐ │       │ X    │ X       │ X    │
188                      │ext     using │       │      │         │      │
189                      │stashed  ses‐ │       │      │         │      │
190                      │sion keys     │       │      │         │      │
191                      ├──────────────┼───────┼──────┼─────────┼──────┤
192                      │Index cleart‐ │       │      │ X       │ X    │
193                      │ext using se‐ │       │      │         │      │
194                      │cret keys     │       │      │         │      │
195                      └──────────────┴───────┴──────┴─────────┴──────┘
196
197
198
199                      │Stash session │       │      │         │ X    │
200                      │keys          │       │      │         │      │
201                      ├──────────────┼───────┼──────┼─────────┼──────┤
202                      │Delete        │ X     │      │         │      │
203                      │stashed  ses‐ │       │      │         │      │
204                      │sion keys  on │       │      │         │      │
205                      │reindex       │       │      │         │      │
206                      └──────────────┴───────┴──────┴─────────┴──────┘
207
208              Stashed  session keys are kept in the database as properties as‐
209              sociated with the message.  See session-key  in  notmuch-proper‐
210              ties(7) for more details about how they can be useful.
211
212              Be  aware  that  the  notmuch  index is likely sufficient (and a
213              stashed session key is certainly sufficient) to reconstruct  the
214              cleartext  of the message itself, so please ensure that the not‐
215              much message index is adequately  protected.   DO  NOT  USE  in‐
216              dex.decrypt=true  or  index.decrypt=nostash  without considering
217              the security of your index.
218
219              Default: auto.
220
221       index.header.<prefix>
222              Define the query prefix <prefix>, based on a  mail  header.  For
223              example  index.header.List=List-Id will add a probabilistic pre‐
224              fix List: that searches the List-Id field.   User  defined  pre‐
225              fixes must not start with 'a'...'z'; in particular adding a pre‐
226              fix with same name as a predefined prefix is not supported.  See
227              notmuch-search-terms(7)  for a list of existing prefixes, and an
228              explanation of probabilistic prefixes.
229
230       built_with.<name>
231              Compile  time  feature  <name>.  Current  possibilities  include
232              "retry_lock"  (configure  option,  included by default).  (since
233              notmuch 0.30, "compact" and  "field_processor"  are  always  in‐
234              cluded.)
235
236       query.<name>
237              Expansion    for   named   query   called   <name>.   See   not‐
238              much-search-terms(7) for more information about named queries.
239

ENVIRONMENT

241       The following environment variables can be used to control the behavior
242       of notmuch.
243
244       NOTMUCH_CONFIG
245              Specifies the location of the notmuch configuration file.
246
247       NOTMUCH_PROFILE
248              Selects among notmuch configurations.
249

FILES

251   CONFIGURATION
252       If NOTMUCH_CONFIG is unset, notmuch tries (in order)
253
254$XDG_CONFIG_HOME/notmuch/<profile>/config  where <profile> is defined
255         by $NOTMUCH_PROFILE or "default"
256
257${HOME}/.notmuch-config<profile> where <profile> is .$NOTMUCH_PROFILE
258         or ""
259
260   Hooks
261       If database.hook_dir is unset, notmuch tries (in order)
262
263$XDG_CONFIG_HOME/notmuch/<profile>/hooks  where  <profile> is defined
264         by $NOTMUCH_PROFILE or "default"
265
266<database.path>/.notmuch/hooks
267

SEE ALSO

269       notmuch(1), notmuch-count(1), notmuch-dump(1),  notmuch-hooks(5),  not‐
270       much-insert(1),  notmuch-new(1),  notmuch-reply(1), notmuch-restore(1),
271       notmuch-search(1), notmuch-search-terms(7), notmuch-properties(7), not‐
272       much-show(1), notmuch-tag(1)
273

AUTHOR

275       Carl Worth and many others
276
278       2009-2021, Carl Worth and many others
279
280
281
282
2830.32.1                           May 17, 2021                NOTMUCH-CONFIG(1)
Impressum