1NOTMUCH-HOOKS(5) notmuch NOTMUCH-HOOKS(5)
2
3
4
6 notmuch-hooks - hooks for notmuch
7
9 <hook_dir>/{pre-new, post-new, post-insert}
10
12 Hooks are scripts (or arbitrary executables or symlinks to such) that
13 notmuch invokes before and after certain actions. These scripts reside
14 in a directory defined as described in notmuch-config. They must have
15 executable permissions.
16
17 The currently available hooks are described below.
18
19 pre-new
20 This hook is invoked by the notmuch-new command before scanning
21 or importing new messages into the database. If this hook exits
22 with a non-zero status, notmuch will abort further processing of
23 the notmuch-new command.
24
25 Typically this hook is used for fetching or delivering new mail
26 to be imported into the database.
27
28 post-new
29 This hook is invoked by the notmuch-new command after any new
30 messages have been imported into the database and initial tags
31 have been applied. The hook will not be run if there have been
32 any errors during the scan or import.
33
34 Typically this hook is used to perform additional query-based
35 tagging on the imported messages.
36
37 post-insert
38 This hook is invoked by the notmuch-insert command after the
39 message has been delivered, added to the database, and initial
40 tags have been applied. The hook will not be run if there have
41 been any errors during the message delivery; what is regarded as
42 successful delivery depends on the --keep option.
43
44 Typically this hook is used to perform additional query-based
45 tagging on the delivered messages.
46
48 notmuch, notmuch-config, notmuch-count, notmuch-dump, notmuch-insert,
49 notmuch-new, notmuch-reply, notmuch-restore, notmuch-search,
50 notmuch-search-terms, notmuch-show, notmuch-tag
51
53 Carl Worth and many others
54
56 2009-2023, Carl Worth and many others
57
58
59
60
610.38 Sep 12, 2023 NOTMUCH-HOOKS(5)