]> git.cworth.org Git - notmuch-wiki/blob - manpages/notmuch-hooks-5.mdwn
d42bfcd94a77de5e494e91c54d4ae4f8b38275bf
[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            $DATABASEDIR/.notmuch/hooks/*
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  the .notmuch/hooks directory within the database directory and must
18        have executable permissions.
19
20        The currently available hooks are described below.
21
22            <b>pre-new</b>
23
24                   This hook is invoked by the <b>new</b> command before  scanning  or
25                   importing new messages into the database. If this hook exits
26                   with a non-zero status, notmuch will abort further  process-
27                   ing of the <b>new</b> command.
28
29                   Typically  this  hook is used for fetching or delivering new
30                   mail to be imported into the database.
31
32            <b>post-new</b>
33
34                   This hook is invoked by the <b>new</b> command after  new  messages
35                   have  been  imported into the database and initial tags have
36                   been applied. The hook will not be run if  there  have  been
37                   any errors during the scan or import.
38
39                   Typically   this   hook   is   used  to  perform  additional
40                   query-based tagging on the imported messages.
41 </pre>
42
43 <h2>SEE ALSO</h2>
44 <pre>
45        <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>
46        <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),
47        <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>
48        <a href='../notmuch-tag-1/'>much-tag</a>(1)
49 </pre>
50
51 <h2>AUTHOR</h2>
52 <pre>
53        Carl Worth and many others
54 </pre>
55
56 <h2>COPYRIGHT</h2>
57 <pre>
58        2014, Carl Worth and many others
59 </pre>
60
61 <h2>0.18</h2>