]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-new.rst
1044d1cdd0f5c0ce3fb09b087cae61262bd080ad
[notmuch] / doc / man1 / notmuch-new.rst
1 .. _notmuch-new(1):
2
3 ===========
4 notmuch-new
5 ===========
6
7 SYNOPSIS
8 ========
9
10 **notmuch** **new** [options]
11
12 DESCRIPTION
13 ===========
14
15 Find and import any new messages to the database.
16
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
20 **unread** tags.
21
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.
29
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.
33
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.
37
38 The **new** command supports hooks. See :any:`notmuch-hooks(5)` for more
39 details on hooks.
40
41 Supported options for **new** include
42
43 ``--no-hooks``
44     Prevents hooks from being run.
45
46 ``--quiet``
47     Do not print progress or results.
48
49 ``--verbose``
50     Print file names being processed. Ignored when combined with
51     ``--quiet``.
52
53 ``--decrypt=(true|nostash|auto|false)``
54     If ``true``, when encountering an encrypted message, try to
55     decrypt it while indexing, and stash any discovered session keys.
56     If ``auto``, try to use any session key already known to belong to
57     this message, but do not attempt to use the user's secret keys.
58     If decryption is successful, index the cleartext of the message.
59
60     Be aware that the index is likely sufficient (and the session key
61     is certainly sufficient) to reconstruct the cleartext of the
62     message itself, so please ensure that the notmuch message index is
63     adequately protected.  DO NOT USE ``--decrypt=true`` or
64     ``--decrypt=nostash`` without considering the security of your
65     index.
66
67     See also ``index.decrypt`` in :any:`notmuch-config(1)`.
68
69 ``--full-scan``
70     By default notmuch-new uses directory modification times (mtimes)
71     to optimize the scanning of directories for new mail. This option turns
72     that optimization off.
73
74 EXIT STATUS
75 ===========
76
77 This command supports the following special exit status code
78
79 ``75 (EX_TEMPFAIL)``
80     A temporary failure occurred; the user is invited to retry.
81
82 SEE ALSO
83 ========
84
85 :any:`notmuch(1)`,
86 :any:`notmuch-config(1)`,
87 :any:`notmuch-count(1)`,
88 :any:`notmuch-dump(1)`,
89 :any:`notmuch-hooks(5)`,
90 :any:`notmuch-insert(1)`,
91 :any:`notmuch-reply(1)`,
92 :any:`notmuch-restore(1)`,
93 :any:`notmuch-search(1)`,
94 :any:`notmuch-search-terms(7)`,
95 :any:`notmuch-show(1)`,
96 :any:`notmuch-tag(1)`