]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-new.rst
emacs: Add new option notmuch-search-hide-excluded
[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 .. program:: new
44
45 .. option:: --no-hooks
46
47    Prevents hooks from being run.
48
49 .. option:: --quiet
50
51    Do not print progress or results.
52
53 .. option:: --verbose
54
55    Print file names being processed. Ignored when combined with
56    ``--quiet``.
57
58 .. option:: --decrypt=(true|nostash|auto|false)
59
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.
65
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
71    index.
72
73    See also ``index.decrypt`` in :any:`notmuch-config(1)`.
74
75 .. option:: --full-scan
76
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.
80
81 CONFIGURATION
82 =============
83
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.
90
91 EXIT STATUS
92 ===========
93
94 This command supports the following special exit status code
95
96 ``75 (EX_TEMPFAIL)``
97     A temporary failure occurred; the user is invited to retry.
98
99 SEE ALSO
100 ========
101
102 :any:`notmuch(1)`,
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)`