1NOTMUCH-INSERT(1)                   notmuch                  NOTMUCH-INSERT(1)
2
3
4

NAME

6       notmuch-insert - add a message to the maildir and notmuch database
7

SYNOPSIS

9       notmuch insert [option ...] [+<tag>|-<tag> ...]
10

DESCRIPTION

12       notmuch insert reads a message from standard input and delivers it into
13       the maildir directory given by configuration option database.path, then
14       incorporates  the  message into the notmuch database. It is an alterna‐
15       tive to using a separate tool to deliver the message then running  not‐
16       much new afterwards.
17
18       The  new message will be tagged with the tags specified by the new.tags
19       configuration option, then by operations specified on the command-line:
20       tags prefixed by '+' are added while those prefixed by '-' are removed.
21
22       If  the  new message is a duplicate of an existing message in the data‐
23       base (it has same Message-ID), it will be added to the  maildir  folder
24       and notmuch database, but the tags will not be changed.
25
26       The  insert  command  supports  hooks.  See  notmuch-hooks(5)  for more
27       details on hooks.
28
29       Option arguments must appear before any tag operation arguments.   Sup‐
30       ported options for insert include
31
32       --folder=<folder>
33              Deliver  the  message  to  the specified folder, relative to the
34              top-level directory given by the  value  of  database.path.  The
35              default  is  the  empty  string,  which  means delivering to the
36              top-level directory.
37
38       --create-folder
39              Try to create the folder named by the  --folder  option,  if  it
40              does not exist. Otherwise the folder must already exist for mail
41              delivery to succeed.
42
43       --keep Keep the message file if indexing fails, and  keep  the  message
44              indexed  if applying tags or maildir flag synchronization fails.
45              Ignore these errors and return exit status 0  to  indicate  suc‐
46              cessful mail delivery.
47
48       --no-hooks
49              Prevent hooks from being run.
50
51       --world-readable
52              When  writing  mail to the mailbox, allow it to be read by users
53              other than the current user.  Note that this does  not  override
54              umask.   By default, delivered mail is only readable by the cur‐
55              rent user.
56
57       --decrypt=(true|nostash|auto|false)
58              If true and the message is encrypted, try to decrypt the message
59              while  indexing, stashing any session keys discovered.  If auto,
60              and notmuch already knows about a session key for  the  message,
61              it  will  try decrypting using that session key but will not try
62              to access the user's secret keys.  If decryption is  successful,
63              index  the  cleartext itself.  Either way, the message is always
64              stored to disk in its original form (ciphertext).
65
66              nostash is the same as  true  except  that  it  will  not  stash
67              newly-discovered session keys in the database.
68
69              Be aware that the index is likely sufficient (and a stashed ses‐
70              sion key is certainly sufficient) to reconstruct  the  cleartext
71              of the message itself, so please ensure that the notmuch message
72              index is adequately protected.  DO  NOT  USE  --decrypt=true  or
73              --decrypt=nostash  without  considering  the  security  of  your
74              index.
75
76              See also index.decrypt in notmuch-config(1).
77

EXIT STATUS

79       This command  returns  exit  status  0  on  successful  mail  delivery,
80       non-zero  otherwise. The default is to indicate failed mail delivery on
81       any errors, including message file delivery to the filesystem,  message
82       indexing  to Notmuch database, changing tags, and synchronizing tags to
83       maildir flags. The --keep option may be used to settle  for  successful
84       message file delivery.
85
86       This command supports the following special exit status code for errors
87       most likely to be temporary in nature, e.g. failure to get  a  database
88       write lock.
89
90       75 (EX_TEMPFAIL)
91              A temporary failure occurred; the user is invited to retry.
92
93       The exit status of the post-insert hook does not affect the exit status
94       of the insert command.
95

SEE ALSO

97       notmuch(1), notmuch-config(1), notmuch-count(1), notmuch-dump(1),  not‐
98       much-hooks(5), notmuch-reply(1), notmuch-restore(1), notmuch-search(1),
99       notmuch-search-terms(7), notmuch-show(1), notmuch-tag(1)
100

AUTHOR

102       Carl Worth and many others
103
105       2009-2020, Carl Worth and many others
106
107
108
109
1100.31.3                           Dec 25, 2020                NOTMUCH-INSERT(1)
Impressum