]> git.cworth.org Git - notmuch-wiki/blob - manpages/notmuch-hooks-5.mdwn
complete sentence
[notmuch-wiki] / manpages / notmuch-hooks-5.mdwn
1 <h1>NOTMUCH-HOOKS(5)</h1>
2
3 <h2>NAME</h2>
4 <pre>
5        notmuch-hooks - hooks for notmuch
6 </pre>
7
8 <h2>SYNOPSIS</h2>
9 <pre>
10        &lt;hook_dir&gt;/{pre-new, post-new, post-insert}
11 </pre>
12
13 <h2>DESCRIPTION</h2>
14 <pre>
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  a  directory  defined  as described in <a href='../notmuch-config-1/'>notmuch-config</a>(1). They must
18        have executable permissions.
19
20        The currently available hooks are described below.
21
22        <b>pre-new</b>
23               This hook is invoked by the <a href='../notmuch-new-1/'>notmuch-new</a>(1) command before  scan‐
24               ning  or  importing new messages into the database. If this hook
25               exits with a non-zero status, notmuch will  abort  further  pro‐
26               cessing of the <a href='../notmuch-new-1/'>notmuch-new</a>(1) command.
27
28               Typically  this hook is used for fetching or delivering new mail
29               to be imported into the database.
30
31        <b>post-new</b>
32               This hook is invoked by the  <a href='../notmuch-new-1/'>notmuch-new</a>(1)  command  after  new
33               messages  have  been imported into the database and initial tags
34               have been applied. The hook will not be run if there  have  been
35               any errors during the scan or import.
36
37               Typically  this  hook  is used to perform additional query-based
38               tagging on the imported messages.
39
40        <b>post-insert</b>
41               This hook is invoked by the <a href='../notmuch-insert-1/'>notmuch-insert</a>(1) command after  the
42               message  has  been delivered, added to the database, and initial
43               tags have been applied. The hook will not be run if  there  have
44               been any errors during the message delivery; what is regarded as
45               successful delivery depends on the <b>--keep</b> option.
46
47               Typically this hook is used to  perform  additional  query-based
48               tagging on the delivered messages.
49 </pre>
50
51 <h2>SEE ALSO</h2>
52 <pre>
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)
57 </pre>
58
59 <h2>AUTHOR</h2>
60 <pre>
61        Carl Worth and many others
62 </pre>
63
64 <h2>COPYRIGHT</h2>
65 <pre>
66        2009-2022, Carl Worth and many others
67 </pre>
68
69 <h2>0.35</h2>