1 <h1>NOTMUCH-INSERT(1)</h1>
5 notmuch-insert - add a message to the maildir and notmuch database
10 <b>notmuch</b> <b>insert</b> [option ...] [+<<u>tag</u>>|-<<u>tag</u>> ...]
15 <b>notmuch</b> <b>insert</b> reads a message from standard input and delivers it into
16 the maildir directory given by configuration option <b>database.path</b>, then
17 incorporates the message into the notmuch database. It is an alterna‐
18 tive to using a separate tool to deliver the message then running <b>not-</b>
19 <b>much</b> <b>new</b> afterwards.
21 The new message will be tagged with the tags specified by the <b>new.tags</b>
22 configuration option, then by operations specified on the command-line:
23 tags prefixed by '+' are added while those prefixed by '-' are removed.
25 If the new message is a duplicate of an existing message in the data‐
26 base (it has same Message-ID), it will be added to the maildir folder
27 and notmuch database, but the tags will not be changed.
29 Option arguments must appear before any tag operation arguments. Sup‐
30 ported options for <b>insert</b> include
32 <b>--folder=<folder></b>
33 Deliver the message to the specified folder, relative to the
34 top-level directory given by the value of <b>database.path</b>. The
35 default is to deliver to the top-level directory.
37 <b>--create-folder</b>
38 Try to create the folder named by the <b>--folder</b> option, if it
39 does not exist. Otherwise the folder must already exist for
40 mail delivery to succeed.
45 This command returns exit status 0 if the message was successfully
46 added to the mail directory, even if the message could not be indexed
47 and added to the notmuch database. In the latter case, a warning will
48 be printed to standard error but the message file will be left on disk.
50 If the message could not be written to disk then a non-zero exit status
56 <a href='../notmuch-1/'>notmuch</a>(1), <a href='../notmuch-config-1/'>notmuch-config</a>(1), <a href='../notmuch-count-1/'>notmuch-count</a>(1), <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>not‐</a>
57 <a href='../notmuch-hooks-5/'>much-hooks</a>(5), <a href='../notmuch-reply-1/'>notmuch-reply</a>(1), <a href='../notmuch-restore-1/'>notmuch-restore</a>(1), <a href='../notmuch-search-1/'>notmuch-search</a>(1),
58 <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7), <a href='../notmuch-show-1/'>notmuch-show</a>(1), <a href='../notmuch-tag-1/'>notmuch-tag</a>(1)
63 Carl Worth and many others
68 2014, Carl Worth and many others