]> git.notmuchmail.org Git - notmuch/blob - man/man1/notmuch-insert.1
man: document 'insert' command
[notmuch] / man / man1 / notmuch-insert.1
1 .TH NOTMUCH-INSERT 1 2013-xx-xx "Notmuch 0.xx"
2 .SH NAME
3 notmuch-insert \- add a message to the maildir and notmuch database
4 .SH SYNOPSIS
5
6 .B notmuch insert
7 .RI "[ +<" tag> "|\-<" tag "> ... ]"
8
9 .SH DESCRIPTION
10
11 .B notmuch insert
12 reads a message from standard input
13 and delivers it into the maildir directory given by configuration option
14 .BR database.path ,
15 then incorporates the message into the notmuch database.
16 It is an alternative to using a separate tool to deliver
17 the message then running
18 .B notmuch new
19 afterwards.
20
21 The new message will be tagged with the tags specified by the
22 .B new.tags
23 configuration option, then by operations specified on the command-line:
24 tags prefixed by '+' are added while
25 those prefixed by '\-' are removed.
26
27 If the new message is a duplicate of an existing message in the database
28 (it has same Message-ID), it will be added to the maildir folder and
29 notmuch database, but the tags will not be changed.
30
31 .RE
32 .SH EXIT STATUS
33
34 This command returns exit status 0 if the message was successfully
35 added to the mail directory, even if the message could not be indexed
36 and added to the notmuch database.  In the latter case, a warning will
37 be printed to standard error but the message file will be left on disk.
38
39 If the message could not be written to disk then a non-zero exit
40 status is returned.
41
42 .RE
43 .SH SEE ALSO
44
45 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
46 \fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-reply\fR(1),
47 \fBnotmuch-restore\fR(1), \fBnotmuch-search\fR(1),
48 \fBnotmuch-search-terms\fR(7), \fBnotmuch-show\fR(1),
49 \fBnotmuch-tag\fR(1)