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