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