]> git.notmuchmail.org Git - notmuch/blob - man/man1/notmuch-insert.1
e85fef8a5d1635410e4bd8f6328d09512bb2701d
[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 "[" options "]"
8 .RI "[ +<" tag> "|\-<" tag "> ... ]"
9
10 .SH DESCRIPTION
11
12 .B notmuch insert
13 reads a message from standard input
14 and delivers it into the maildir directory given by configuration option
15 .BR database.path ,
16 then incorporates the message into the notmuch database.
17 It is an alternative to using a separate tool to deliver
18 the message then running
19 .B notmuch new
20 afterwards.
21
22 The new message will be tagged with the tags specified by the
23 .B new.tags
24 configuration option, then by operations specified on the command-line:
25 tags prefixed by '+' are added while
26 those prefixed by '\-' are removed.
27
28 If the new message is a duplicate of an existing message in the database
29 (it has same Message-ID), it will be added to the maildir folder and
30 notmuch database, but the tags will not be changed.
31
32 Option arguments must appear before any tag operation arguments.
33 Supported options for
34 .B insert
35 include
36 .RS 4
37 .TP 4
38 .BI "--folder=<" folder ">"
39
40 Deliver the message to the specified folder,
41 relative to the top-level directory given by the value of
42 \fBdatabase.path\fR.
43 The default is to deliver to the top-level directory.
44
45 .RE
46 .SH EXIT STATUS
47
48 This command returns exit status 0 if the message was successfully
49 added to the mail directory, even if the message could not be indexed
50 and added to the notmuch database.  In the latter case, a warning will
51 be printed to standard error but the message file will be left on disk.
52
53 If the message could not be written to disk then a non-zero exit
54 status is returned.
55
56 .RE
57 .SH SEE ALSO
58
59 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
60 \fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-reply\fR(1),
61 \fBnotmuch-restore\fR(1), \fBnotmuch-search\fR(1),
62 \fBnotmuch-search-terms\fR(7), \fBnotmuch-show\fR(1),
63 \fBnotmuch-tag\fR(1)