1NOTMUCH(1) notmuch NOTMUCH(1)
2
3
4
6 notmuch - thread-based email index, search, and tagging
7
9 notmuch [option ...] command [arg ...]
10
12 Notmuch is a command-line based program for indexing, searching, read‐
13 ing, and tagging large collections of email messages.
14
15 This page describes how to get started using notmuch from the command
16 line, and gives a brief overview of the commands available. For more
17 information on e.g. notmuch show consult the notmuch-show(1) man page,
18 also accessible via notmuch help show
19
20 The quickest way to get started with Notmuch is to simply invoke the
21 notmuch command with no arguments, which will interactively guide you
22 through the process of indexing your mail.
23
25 While the command-line program notmuch provides powerful functionality,
26 it does not provide the most convenient interface for that functional‐
27 ity. More sophisticated interfaces are expected to be built on top of
28 either the command-line interface, or more likely, on top of the not‐
29 much library interface. See https://notmuchmail.org for more about
30 alternate interfaces to notmuch. The emacs-based interface to notmuch
31 (available under emacs/ in the Notmuch source distribution) is probably
32 the most widely used at this time.
33
35 Supported global options for notmuch include
36
37 --help [command-name]
38 Print a synopsis of available commands and exit. With an
39 optional command name, show the man page for that subcommand.
40
41 --version
42 Print the installed version of notmuch, and exit.
43
44 --config=FILE
45 Specify the configuration file to use. This overrides any con‐
46 figuration file specified by ${NOTMUCH_CONFIG}.
47
48 --uuid=HEX
49 Enforce that the database UUID (a unique identifier which per‐
50 sists until e.g. the database is compacted) is HEX; exit with an
51 error if it is not. This is useful to detect rollover in modifi‐
52 cation counts on messages. You can find this UUID using e.g.
53 notmuch count --lastmod
54
55 All global options except --config can also be specified after the com‐
56 mand. For example, notmuch subcommand --uuid=HEX is equivalent to not‐
57 much --uuid=HEX subcommand.
58
60 SETUP
61 The notmuch setup command is used to configure Notmuch for first use,
62 (or to reconfigure it later).
63
64 The setup command will prompt for your full name, your primary email
65 address, any alternate email addresses you use, and the directory con‐
66 taining your email archives. Your answers will be written to a configu‐
67 ration file in ${NOTMUCH_CONFIG} (if set) or ${HOME}/.notmuch-config .
68 This configuration file will be created with descriptive comments, mak‐
69 ing it easy to edit by hand later to change the configuration. Or you
70 can run notmuch setup again to change the configuration.
71
72 The mail directory you specify can contain any number of sub-directo‐
73 ries and should primarily contain only files with individual email mes‐
74 sages (eg. maildir or mh archives are perfect). If there are other,
75 non-email files (such as indexes maintained by other email programs)
76 then notmuch will do its best to detect those and ignore them.
77
78 Mail storage that uses mbox format, (where one mbox file contains many
79 messages), will not work with notmuch. If that's how your mail is cur‐
80 rently stored, it is recommended you first convert it to maildir format
81 with a utility such as mb2md before running notmuch setup .
82
83 Invoking notmuch with no command argument will run setup if the setup
84 command has not previously been completed.
85
86 OTHER COMMANDS
87 Several of the notmuch commands accept search terms with a common syn‐
88 tax. See notmuch-search-terms(7) for more details on the supported syn‐
89 tax.
90
91 The search, show, address and count commands are used to query the
92 email database.
93
94 The reply command is useful for preparing a template for an email
95 reply.
96
97 The tag command is the only command available for manipulating database
98 contents.
99
100 The dump and restore commands can be used to create a textual dump of
101 email tags for backup purposes, and to restore from that dump.
102
103 The config command can be used to get or set settings in the notmuch
104 configuration file.
105
106 CUSTOM COMMANDS
107 If the given command is not known to notmuch, notmuch tries to execute
108 the external notmuch-<subcommand> in ${PATH} instead. This allows users
109 to have their own notmuch related tools to be run via the notmuch com‐
110 mand. By design, this does not allow notmuch's own commands to be over‐
111 ridden using external commands.
112
113 OPTION SYNTAX
114 All options accepting an argument can be used with '=' or ':' as a sep‐
115 arator. For the cases where it's not ambiguous (in particular excluding
116 boolean options), a space can also be used. The following are all
117 equivalent:
118
119 notmuch --config=alt-config config get user.name
120 notmuch --config:alt-config config get user.name
121 notmuch --config alt-config config get user.name
122
124 The following environment variables can be used to control the behavior
125 of notmuch.
126
127 NOTMUCH_CONFIG
128 Specifies the location of the notmuch configuration file. Not‐
129 much will use ${HOME}/.notmuch-config if this variable is not
130 set.
131
132 NOTMUCH_TALLOC_REPORT
133 Location to write a talloc memory usage report. See tal‐
134 loc_enable_leak_report_full in talloc(3) for more information.
135
136 NOTMUCH_DEBUG_QUERY
137 If set to a non-empty value, the notmuch library will print (to
138 stderr) Xapian queries it constructs.
139
141 notmuch-address(1), notmuch-compact(1), notmuch-config(1), not‐
142 much-count(1), notmuch-dump(1), notmuch-hooks(5), notmuch-insert(1),
143 notmuch-new(1), notmuch-properties(7), notmuch-reindex(1), not‐
144 much-reply(1), notmuch-restore(1), notmuch-search(1), not‐
145 much-search-terms(7), notmuch-show(1), notmuch-tag(1)
146
147 The notmuch website: https://notmuchmail.org
148
150 Feel free to send questions, comments, or kudos to the notmuch mailing
151 list <notmuch@notmuchmail.org> . Subscription is not required before
152 posting, but is available from the notmuchmail.org website.
153
154 Real-time interaction with the Notmuch community is available via IRC
155 (server: irc.freenode.net, channel: #notmuch).
156
158 Carl Worth and many others
159
161 2009-2019, Carl Worth and many others
162
163
164
165
1660.29.1 Jul 25, 2019 NOTMUCH(1)