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.mail_root,
14       then  incorporates  the message into the notmuch database. It is an al‐
15       ternative to using a separate tool to deliver the message then  running
16       notmuch-new(1) 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 de‐
27       tails 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.mail_root.
35              The  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 in‐
74              dex.
75
76              See also index.decrypt in notmuch-config(1).
77

CONFIGURATION

79       Indexing is influenced by the configuration options  index.decrypt  and
80       index.header.   Tagging  is controlled by new.tags and maildir.synchro‐
81       nize_flags.  See notmuch-config(1) for details.
82

EXIT STATUS

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

SEE ALSO

102       notmuch(1), notmuch-config(1), notmuch-count(1), notmuch-dump(1),  not‐
103       much-hooks(5), notmuch-reply(1), notmuch-restore(1), notmuch-search(1),
104       notmuch-search-terms(7), notmuch-show(1), notmuch-tag(1)
105

AUTHOR

107       Carl Worth and many others
108
110       2009-2022, Carl Worth and many others
111
112
113
114
1150.36                             Jun 25, 2022                NOTMUCH-INSERT(1)
Impressum