1 <h1>NOTMUCH-HOOKS(5)</h1>
5 notmuch-hooks - hooks for notmuch
10 $DATABASEDIR/.notmuch/hooks/*
15 Hooks are scripts (or arbitrary executables or symlinks to such) that
16 notmuch invokes before and after certain actions. These scripts reside
17 in the .notmuch/hooks directory within the database directory and must
18 have executable permissions.
20 The currently available hooks are described below.
23 This hook is invoked by the <b>new</b> command before scanning or
24 importing new messages into the database. If this hook exits
25 with a non-zero status, notmuch will abort further processing
26 of the <b>new</b> command.
28 Typically this hook is used for fetching or delivering new
29 mail to be imported into the database.
32 This hook is invoked by the <b>new</b> command after new messages
33 have been imported into the database and initial tags have
34 been applied. The hook will not be run if there have been any
35 errors during the scan or import.
37 Typically this hook is used to perform additional query-based
38 tagging on the imported messages.
41 This hook is invoked by the <b>insert</b> command after the message has
42 been delivered, added to the database, and initial tags have
43 been applied. The hook will not be run if there have been any
44 errors during the message delivery; what is regarded as succes‐
45 ful delivery depends on the <b>--keep</b> option.
47 Typically this hook is used to perform additional query-based
48 tagging on the delivered messages.
53 <a href='../notmuch-1/'>notmuch</a>(1), <a href='../notmuch-config-1/'>notmuch-config</a>(1), <a href='../notmuch-count-1/'>notmuch-count</a>(1), <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-insert-1/'>not‐</a>
54 <a href='../notmuch-insert-1/'>much-insert</a>(1), <a href='../notmuch-new-1/'>notmuch-new</a>(1), <a href='../notmuch-reply-1/'>notmuch-reply</a>(1), <a href='../notmuch-restore-1/'>notmuch-restore</a>(1),
55 <a href='../notmuch-search-1/'>notmuch-search</a>(1), <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7), <a href='../notmuch-show-1/'>notmuch-show</a>(1), <a href='../notmuch-tag-1/'>not‐</a>
56 <a href='../notmuch-tag-1/'>much-tag</a>(1)
61 Carl Worth and many others
66 2015, Carl Worth and many others