11 **notmuch** [option ...] **command** [arg ...]
16 Notmuch is a command-line based program for indexing, searching,
17 reading, and tagging large collections of email messages.
19 This page describes how to get started using notmuch from the command
20 line, and gives a brief overview of the commands available. For more
21 information on e.g. **notmuch show** consult the
22 :any:`notmuch-show(1)` man page, also accessible via **notmuch help
25 The quickest way to get started with Notmuch is to simply invoke the
26 ``notmuch`` command with no arguments, which will interactively guide
27 you through the process of indexing your mail.
32 While the command-line program ``notmuch`` provides powerful
33 functionality, it does not provide the most convenient interface for
34 that functionality. More sophisticated interfaces are expected to be
35 built on top of either the command-line interface, or more likely, on
36 top of the notmuch library interface. See https://notmuchmail.org for
37 more about alternate interfaces to notmuch. The emacs-based interface to
38 notmuch (available under **emacs/** in the Notmuch source distribution)
39 is probably the most widely used at this time.
44 Supported global options for ``notmuch`` include
46 ``--help`` [command-name]
47 Print a synopsis of available commands and exit. With an optional
48 command name, show the man page for that subcommand.
51 Print the installed version of notmuch, and exit.
54 Specify the configuration file to use. This overrides any
55 configuration file specified by :envvar:`NOTMUCH_CONFIG`. The empty
56 string is a permitted and sometimes useful value of *FILE*, which
57 tells ``notmuch`` to use only configuration metadata from the database.
60 Enforce that the database UUID (a unique identifier which persists
61 until e.g. the database is compacted) is HEX; exit with an error
62 if it is not. This is useful to detect rollover in modification
63 counts on messages. You can find this UUID using e.g. ``notmuch
66 All global options except ``--config`` can also be specified after the
67 command. For example, ``notmuch subcommand --uuid=HEX`` is equivalent
68 to ``notmuch --uuid=HEX subcommand``.
76 The **notmuch setup** command is used to configure Notmuch for first
77 use, (or to reconfigure it later).
79 The setup command will prompt for your full name, your primary email
80 address, any alternate email addresses you use, and the directory
81 containing your email archives. Your answers will be written to a
82 configuration file in :envvar:`NOTMUCH_CONFIG` (if set) or
83 ${HOME}/.notmuch-config . This configuration file will be created with
84 descriptive comments, making it easy to edit by hand later to change the
85 configuration. Or you can run **notmuch setup** again to change the
88 The mail directory you specify can contain any number of sub-directories
89 and should primarily contain only files with individual email messages
90 (eg. maildir or mh archives are perfect). If there are other, non-email
91 files (such as indexes maintained by other email programs) then notmuch
92 will do its best to detect those and ignore them.
94 Mail storage that uses mbox format, (where one mbox file contains many
95 messages), will not work with notmuch. If that's how your mail is
96 currently stored, it is recommended you first convert it to maildir
97 format with a utility such as :manpage:`mb2md(1)` before running
100 Invoking ``notmuch`` with no command argument will run **setup** if the
101 setup command has not previously been completed.
106 Several of the notmuch commands accept search terms with a common
107 syntax. See :any:`notmuch-search-terms(7)` for more details on the
110 The :any:`notmuch-search(1)`, :any:`notmuch-show(1)`,
111 :any:`notmuch-address(1)` and :any:`notmuch-count(1)` commands are
112 used to query the email database.
114 The :any:`notmuch-reply(1)` command is useful for preparing a template
117 The :any:`notmuch-tag(1)` command is the only command available for
118 manipulating database contents.
120 The :any:`notmuch-dump(1)` and :any:`notmuch-restore(1)` commands can
121 be used to create a textual dump of email tags for backup purposes,
122 and to restore from that dump.
124 The :any:`notmuch-config(1)` command can be used to get or set
125 settings in the notmuch configuration file.
130 If the given command is not known to notmuch, notmuch tries to execute
131 the external **notmuch-<subcommand>** in :envvar:`PATH` instead. This
132 allows users to have their own notmuch related tools to be run via the
133 notmuch command. By design, this does not allow notmuch's own commands
134 to be overridden using external commands.
139 All options accepting an argument can be used with '=' or ':' as a
140 separator. Except for boolean options (which would be ambiguous), a
141 space can also be used as a separator. The following are all
146 notmuch --config=alt-config config get user.name
147 notmuch --config:alt-config config get user.name
148 notmuch --config alt-config config get user.name
153 The following environment variables can be used to control the behavior
156 .. envvar:: NOTMUCH_CONFIG
158 Specifies the location of the notmuch configuration file. See
159 :any:`notmuch-config(1)` for details.
161 .. envvar:: NOTMUCH_PROFILE
163 Selects among notmuch configurations. See :any:`notmuch-config(1)`
166 .. envvar:: NOTMUCH_TALLOC_REPORT
168 Location to write a talloc memory usage report. See
169 **talloc\_enable\_leak\_report\_full** in :manpage:`talloc(3)` for more
172 .. envvar:: NOTMUCH_DEBUG_QUERY
174 If set to a non-empty value, the notmuch library will print (to
175 stderr) Xapian queries it constructs.
180 :any:`notmuch-address(1)`,
181 :any:`notmuch-compact(1)`,
182 :any:`notmuch-config(1)`,
183 :any:`notmuch-count(1)`,
184 :any:`notmuch-dump(1)`,
185 :any:`notmuch-hooks(5)`,
186 :any:`notmuch-insert(1)`,
187 :any:`notmuch-new(1)`,
188 :any:`notmuch-properties(7)`,
189 :any:`notmuch-reindex(1)`,
190 :any:`notmuch-reply(1)`,
191 :any:`notmuch-restore(1)`,
192 :any:`notmuch-search(1)`,
193 :any:`notmuch-search-terms(7)`,
194 :any:`notmuch-show(1)`,
195 :any:`notmuch-tag(1)`
197 The notmuch website: **https://notmuchmail.org**
202 Feel free to send questions, comments, or kudos to the notmuch mailing
203 list <notmuch@notmuchmail.org> . Subscription is not required before
204 posting, but is available from the notmuchmail.org website.
206 Real-time interaction with the Notmuch community is available via IRC
207 (server: irc.freenode.net, channel: #notmuch).