10 **notmuch** **new** [options]
15 Find and import any new messages to the database.
17 The **new** command scans all sub-directories of the database,
18 performing full-text indexing on new messages that are found. Each new
19 message will automatically be tagged with both the **inbox** and
22 You should run **notmuch new** once after first running
23 :any:`notmuch-setup(1)` to create the initial database. The first run
24 may take a long time if you have a significant amount of mail (several
25 hundred thousand messages or more). Subsequently, you should run
26 **notmuch new** whenever new mail is delivered and you wish to
27 incorporate it into the database. These subsequent runs will be much
28 quicker than the initial run.
30 Invoking ``notmuch`` with no command argument will run **new** if
31 :any:`notmuch-setup(1)` has previously been completed, but **notmuch
32 new** has not previously been run.
34 **notmuch new** updates tags according to maildir flag changes if the
35 **maildir.synchronize\_flags** configuration option is enabled. See
36 :any:`notmuch-config(1)` for details.
38 The **new** command supports hooks. See :any:`notmuch-hooks(5)` for more
41 Supported options for **new** include
45 .. option:: --no-hooks
47 Prevents hooks from being run.
51 Do not print progress or results.
55 Print file names being processed. Ignored when combined with
58 .. option:: --decrypt=(true|nostash|auto|false)
60 If ``true``, when encountering an encrypted message, try to
61 decrypt it while indexing, and stash any discovered session keys.
62 If ``auto``, try to use any session key already known to belong to
63 this message, but do not attempt to use the user's secret keys.
64 If decryption is successful, index the cleartext of the message.
66 Be aware that the index is likely sufficient (and the session key
67 is certainly sufficient) to reconstruct the cleartext of the
68 message itself, so please ensure that the notmuch message index is
69 adequately protected. DO NOT USE ``--decrypt=true`` or
70 ``--decrypt=nostash`` without considering the security of your
73 See also ``index.decrypt`` in :any:`notmuch-config(1)`.
75 .. option:: --full-scan
77 By default notmuch-new uses directory modification times (mtimes)
78 to optimize the scanning of directories for new mail. This option turns
79 that optimization off.
84 Indexing is influenced by the configuration options
85 :nmconfig:`index.decrypt`, :nmconfig:`index.header.\<prefix\>`
86 and :nmconfig:`new.ignore`. Tagging
87 is controlled by :nmconfig:`new.tags` and
88 :nmconfig:`maildir.synchronize_flags`. See
89 :any:`notmuch-config(1)` for details.
94 This command supports the following special exit status code
97 A temporary failure occurred; the user is invited to retry.
103 :any:`notmuch-config(1)`,
104 :any:`notmuch-count(1)`,
105 :any:`notmuch-dump(1)`,
106 :any:`notmuch-hooks(5)`,
107 :any:`notmuch-insert(1)`,
108 :any:`notmuch-reply(1)`,
109 :any:`notmuch-restore(1)`,
110 :any:`notmuch-search(1)`,
111 :any:`notmuch-search-terms(7)`,
112 :any:`notmuch-show(1)`,
113 :any:`notmuch-tag(1)`