]> git.notmuchmail.org Git - notmuch/blob - man/man1/notmuch-insert.1
version: set new version and release date
[notmuch] / man / man1 / notmuch-insert.1
1 .TH NOTMUCH-INSERT 1 2013-07-28 "Notmuch 0.16"
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
47 .RS 4
48 .TP 4
49 .B "--create-folder"
50
51 Try to create the folder named by the
52 .B "--folder"
53 option, if it does not exist.
54 Otherwise the folder must already exist for mail
55 delivery to succeed.
56
57 .RE
58 .SH EXIT STATUS
59
60 This command returns exit status 0 if the message was successfully
61 added to the mail directory, even if the message could not be indexed
62 and added to the notmuch database.  In the latter case, a warning will
63 be printed to standard error but the message file will be left on disk.
64
65 If the message could not be written to disk then a non-zero exit
66 status is returned.
67
68 .RE
69 .SH SEE ALSO
70
71 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
72 \fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-reply\fR(1),
73 \fBnotmuch-restore\fR(1), \fBnotmuch-search\fR(1),
74 \fBnotmuch-search-terms\fR(7), \fBnotmuch-show\fR(1),
75 \fBnotmuch-tag\fR(1)