.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "NOTMUCH" "1" "Feb 05, 2024" "0.38.2" "notmuch" .SH NAME notmuch \- thread-based email index, search, and tagging .SH SYNOPSIS .sp \fBnotmuch\fP [option ...] \fBcommand\fP [arg ...] .SH DESCRIPTION .sp Notmuch is a command\-line based program for indexing, searching, reading, and tagging large collections of email messages. .sp This page describes how to get started using notmuch from the command line, and gives a brief overview of the commands available. For more information on e.g. \fBnotmuch show\fP consult the \fI\%notmuch\-show\fP man page, also accessible via \fBnotmuch help show\fP .sp The quickest way to get started with Notmuch is to simply invoke the \fBnotmuch\fP command with no arguments, which will interactively guide you through the process of indexing your mail. .SH NOTE .sp While the command\-line program \fBnotmuch\fP provides powerful functionality, it does not provide the most convenient interface for that functionality. More sophisticated interfaces are expected to be built on top of either the command\-line interface, or more likely, on top of the notmuch library interface. See \fI\%https://notmuchmail.org\fP for more about alternate interfaces to notmuch. The emacs\-based interface to notmuch (available under \fBemacs/\fP in the Notmuch source distribution) is probably the most widely used at this time. .SH OPTIONS .sp Supported global options for \fBnotmuch\fP include .INDENT 0.0 .TP .B \-\-help [command\-name] Print a synopsis of available commands and exit. With an optional command name, show the man page for that subcommand. .UNINDENT .INDENT 0.0 .TP .B \-\-version Print the installed version of notmuch, and exit. .UNINDENT .INDENT 0.0 .TP .B \-\-config=FILE Specify the configuration file to use. This overrides any configuration file specified by \fI\%NOTMUCH_CONFIG\fP\&. The empty string is a permitted and sometimes useful value of \fIFILE\fP, which tells \fBnotmuch\fP to use only configuration metadata from the database. .UNINDENT .INDENT 0.0 .TP .B \-\-uuid=HEX Enforce that the database UUID (a unique identifier which persists until e.g. the database is compacted) is HEX; exit with an error if it is not. This is useful to detect rollover in modification counts on messages. You can find this UUID using e.g. \fBnotmuch count \-\-lastmod\fP .UNINDENT .sp All global options except \fB\-\-config\fP can also be specified after the command. For example, \fBnotmuch subcommand \-\-uuid=HEX\fP is equivalent to \fBnotmuch \-\-uuid=HEX subcommand\fP\&. .SH COMMANDS .SS SETUP .sp The \fBnotmuch setup\fP command is used to configure Notmuch for first use, (or to reconfigure it later). .sp The setup command will prompt for your full name, your primary email address, any alternate email addresses you use, and the directory containing your email archives. Your answers will be written to a configuration file in \fI\%NOTMUCH_CONFIG\fP (if set) or ${HOME}/.notmuch\-config . This configuration file will be created with descriptive comments, making it easy to edit by hand later to change the configuration. Or you can run \fBnotmuch setup\fP again to change the configuration. .sp The mail directory you specify can contain any number of sub\-directories and should primarily contain only files with individual email messages (eg. maildir or mh archives are perfect). If there are other, non\-email files (such as indexes maintained by other email programs) then notmuch will do its best to detect those and ignore them. .sp Mail storage that uses mbox format, (where one mbox file contains many messages), will not work with notmuch. If that\(aqs how your mail is currently stored, it is recommended you first convert it to maildir format with a utility such as \fBmb2md(1)\fP before running \fBnotmuch setup\fP\&. .sp Invoking \fBnotmuch\fP with no command argument will run \fBsetup\fP if the setup command has not previously been completed. .SS OTHER COMMANDS .sp Several of the notmuch commands accept search terms with a common syntax. See \fI\%notmuch\-search\-terms\fP for more details on the supported syntax. .sp The \fI\%notmuch\-search\fP, \fI\%notmuch\-show\fP, \fI\%notmuch\-address\fP and \fI\%notmuch\-count\fP commands are used to query the email database. .sp The \fI\%notmuch\-reply\fP command is useful for preparing a template for an email reply. .sp The \fI\%notmuch\-tag\fP command is the only command available for manipulating database contents. .sp The \fI\%notmuch\-dump\fP and \fI\%notmuch\-restore\fP commands can be used to create a textual dump of email tags for backup purposes, and to restore from that dump. .sp The \fI\%notmuch\-config\fP command can be used to get or set settings in the notmuch configuration file. .SS EXTERNAL COMMANDS .sp If the given command is not known to notmuch, notmuch tries to execute the external \fBnotmuch\-\fP in \fBPATH\fP instead. This allows users to have their own notmuch related tools to be run via the notmuch command. By design, this does not allow notmuch\(aqs own commands to be overridden using external commands. The environment variable \fI\%NOTMUCH_CONFIG\fP will be set according to \fI\%\-\-config\fP, if the latter is present. .SS OPTION SYNTAX .sp All options accepting an argument can be used with \(aq=\(aq or \(aq:\(aq as a separator. Except for boolean options (which would be ambiguous), a space can also be used as a separator. The following are all equivalent: .INDENT 0.0 .INDENT 3.5 .sp .EX notmuch \-\-config=alt\-config config get user.name notmuch \-\-config:alt\-config config get user.name notmuch \-\-config alt\-config config get user.name .EE .UNINDENT .UNINDENT .SH DUPLICATE MESSAGE FILES .sp Notmuch considers the \fIMessage\-ID\fP to be the primary identifier of message. Per \fI\%RFC 5322\fP the \fIMessage\-ID\fP is supposed to be globally unique, but this fails in two distinct ways. When you receive copies of a message via a mechanism like \fICc\fP or via a mailing list, the copies are typically interchangeable. In the case of some broken mail sending software, the same \fIMessage\-ID\fP is used for completely unrelated messages. The options \fI\%search \-\-duplicate\fP and \fI\%show \-\-duplicate\fP options provide the user with control over which message file is displayed. Front ends will need to provide their own interface, see e.g. the Emacs front\-end \fI\%Dealing with duplicates\fP\&. .SH ENVIRONMENT .sp The following environment variables can be used to control the behavior of notmuch. .INDENT 0.0 .TP .B NOTMUCH_CONFIG Specifies the location of the notmuch configuration file. See \fI\%notmuch\-config\fP for details. .UNINDENT .INDENT 0.0 .TP .B NOTMUCH_DATABASE Specifies the location of the notmuch database. See \fI\%notmuch\-config\fP for details. .UNINDENT .INDENT 0.0 .TP .B NOTMUCH_PROFILE Selects among notmuch configurations. See \fI\%notmuch\-config\fP for details. .UNINDENT .INDENT 0.0 .TP .B NOTMUCH_TALLOC_REPORT Location to write a talloc memory usage report. See \fBtalloc_enable_leak_report_full\fP in \fBtalloc(3)\fP for more information. .UNINDENT .INDENT 0.0 .TP .B NOTMUCH_DEBUG_QUERY If set to a non\-empty value, the notmuch library will print (to stderr) Xapian queries it constructs. .UNINDENT .SH SEE ALSO .sp \fI\%notmuch\-address\fP, \fI\%notmuch\-compact\fP, \fI\%notmuch\-config\fP, \fI\%notmuch\-count\fP, \fI\%notmuch\-dump\fP, \fI\%notmuch\-hooks\fP, \fI\%notmuch\-insert\fP, \fI\%notmuch\-new\fP, \fI\%notmuch\-properties\fP, \fI\%notmuch\-reindex\fP, \fI\%notmuch\-reply\fP, \fI\%notmuch\-restore\fP, \fI\%notmuch\-search\fP, \fI\%notmuch\-search\-terms\fP, \fI\%notmuch\-show\fP, \fI\%notmuch\-tag\fP .sp The notmuch website: \fBhttps://notmuchmail.org\fP .SH CONTACT .sp Feel free to send questions, comments, or kudos to the notmuch mailing list <\fI\%notmuch@notmuchmail.org\fP> . Subscription is not required before posting, but is available from the notmuchmail.org website. .sp Real\-time interaction with the Notmuch community is available via IRC (server: irc.libera.chat, channel: #notmuch). .SH AUTHOR Carl Worth and many others .SH COPYRIGHT 2009-2024, Carl Worth and many others .\" Generated by docutils manpage writer. .