]> git.cworth.org Git - notmuch/blob - doc/man1/notmuch.rst
7fdcc9dd57fbeb99cfd7b391730e9df20b0543c4
[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. With an optional
44     command name, show the man page for that subcommand.
45
46 ``--version``
47     Print the installed version of notmuch, and exit.
48
49 ``--config=FILE``
50     Specify the configuration file to use. This overrides any
51     configuration file specified by ${NOTMUCH\_CONFIG}. The empty
52     string is a permitted and sometimes useful value of *FILE*, which
53     tells ``notmuch`` to use only configuration metadata from the database.
54
55 ``--uuid=HEX``
56     Enforce that the database UUID (a unique identifier which persists
57     until e.g. the database is compacted) is HEX; exit with an error
58     if it is not. This is useful to detect rollover in modification
59     counts on messages. You can find this UUID using e.g. ``notmuch
60     count --lastmod``
61
62 All global options except ``--config`` can also be specified after the
63 command. For example, ``notmuch subcommand --uuid=HEX`` is equivalent
64 to ``notmuch --uuid=HEX subcommand``.
65
66 COMMANDS
67 ========
68
69 SETUP
70 -----
71
72 The **notmuch setup** command is used to configure Notmuch for first
73 use, (or to reconfigure it later).
74
75 The setup command will prompt for your full name, your primary email
76 address, any alternate email addresses you use, and the directory
77 containing your email archives. Your answers will be written to a
78 configuration file in ${NOTMUCH\_CONFIG} (if set) or
79 ${HOME}/.notmuch-config . This configuration file will be created with
80 descriptive comments, making it easy to edit by hand later to change the
81 configuration. Or you can run **notmuch setup** again to change the
82 configuration.
83
84 The mail directory you specify can contain any number of sub-directories
85 and should primarily contain only files with individual email messages
86 (eg. maildir or mh archives are perfect). If there are other, non-email
87 files (such as indexes maintained by other email programs) then notmuch
88 will do its best to detect those and ignore them.
89
90 Mail storage that uses mbox format, (where one mbox file contains many
91 messages), will not work with notmuch. If that's how your mail is
92 currently stored, it is recommended you first convert it to maildir
93 format with a utility such as :manpage:`mb2md(1)` before running
94 **notmuch setup**.
95
96 Invoking ``notmuch`` with no command argument will run **setup** if the
97 setup command has not previously been completed.
98
99 OTHER COMMANDS
100 --------------
101
102 Several of the notmuch commands accept search terms with a common
103 syntax. See **notmuch-search-terms**\ (7) for more details on the
104 supported syntax.
105
106 The **search**, **show**, **address** and **count** commands are used
107 to query the email database.
108
109 The **reply** command is useful for preparing a template for an email
110 reply.
111
112 The **tag** command is the only command available for manipulating
113 database contents.
114
115 The **dump** and **restore** commands can be used to create a textual
116 dump of email tags for backup purposes, and to restore from that dump.
117
118 The **config** command can be used to get or set settings in the notmuch
119 configuration file.
120
121 CUSTOM COMMANDS
122 ---------------
123
124 If the given command is not known to notmuch, notmuch tries to execute
125 the external **notmuch-<subcommand>** in ${PATH} instead. This allows
126 users to have their own notmuch related tools to be run via the
127 notmuch command. By design, this does not allow notmuch's own commands
128 to be overridden using external commands.
129
130 OPTION SYNTAX
131 -------------
132
133 All options accepting an argument can be used with '=' or ':' as a
134 separator. Except for boolean options (which would be ambiguous), a
135 space can also be used as a separator. The following are all
136 equivalent:
137
138 ::
139
140    notmuch --config=alt-config config get user.name
141    notmuch --config:alt-config config get user.name
142    notmuch --config alt-config config get user.name
143
144 ENVIRONMENT
145 ===========
146
147 The following environment variables can be used to control the behavior
148 of notmuch.
149
150 **NOTMUCH\_CONFIG**
151     Specifies the location of the notmuch configuration file. Notmuch
152     will use ${HOME}/.notmuch-config if this variable is not set.
153
154 **NOTMUCH\_TALLOC\_REPORT**
155     Location to write a talloc memory usage report. See
156     **talloc\_enable\_leak\_report\_full** in :manpage:`talloc(3)` for more
157     information.
158
159 **NOTMUCH\_DEBUG\_QUERY**
160     If set to a non-empty value, the notmuch library will print (to
161     stderr) Xapian queries it constructs.
162
163 SEE ALSO
164 ========
165
166 **notmuch-address(1)**,
167 **notmuch-compact(1)**,
168 **notmuch-config(1)**,
169 **notmuch-count(1)**,
170 **notmuch-dump(1)**,
171 **notmuch-hooks(5)**,
172 **notmuch-insert(1)**,
173 **notmuch-new(1)**,
174 **notmuch-properties(7)**,
175 **notmuch-reindex(1)**,
176 **notmuch-reply(1)**,
177 **notmuch-restore(1)**,
178 **notmuch-search(1)**,
179 **notmuch-search-terms(7)**,
180 **notmuch-show(1)**,
181 **notmuch-tag(1)**
182
183 The notmuch website: **https://notmuchmail.org**
184
185 CONTACT
186 =======
187
188 Feel free to send questions, comments, or kudos to the notmuch mailing
189 list <notmuch@notmuchmail.org> . Subscription is not required before
190 posting, but is available from the notmuchmail.org website.
191
192 Real-time interaction with the Notmuch community is available via IRC
193 (server: irc.freenode.net, channel: #notmuch).