]> git.notmuchmail.org Git - notmuch/blob - man/man5/notmuch-hooks.5
07b64f5fce88f0db587cec563c3e63967382a9a3
[notmuch] / man / man5 / notmuch-hooks.5
1 .TH NOTMUCH-HOOKS 5 2012-08-20 "Notmuch 0.14"
2
3 .SH NAME
4 notmuch-hooks \- hooks for notmuch
5
6 .SH SYNOPSIS
7  $DATABASEDIR/.notmuch/hooks/*
8
9 .SH DESCRIPTION
10 Hooks are scripts (or arbitrary executables or symlinks to such) that notmuch
11 invokes before and after certain actions. These scripts reside in
12 the .notmuch/hooks directory within the database directory and must have
13 executable permissions.
14
15 The currently available hooks are described below.
16 .RS 4
17 .TP 4
18 .B pre\-new
19 This hook is invoked by the
20 .B new
21 command before scanning or importing new messages into the database. If this
22 hook exits with a non-zero status, notmuch will abort further processing of the
23 .B new
24 command.
25
26 Typically this hook is used for fetching or delivering new mail to be imported
27 into the database.
28 .RE
29 .RS 4
30 .TP 4
31 .B post\-new
32 This hook is invoked by the
33 .B new
34 command after new messages have been imported into the database and initial tags
35 have been applied. The hook will not be run if there have been any errors during
36 the scan or import.
37
38 Typically this hook is used to perform additional query\-based tagging on the
39 imported messages.
40 .RE
41
42 .SH SEE ALSO
43
44 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
45 \fBnotmuch-dump\fR(1), \fBnotmuch-new\fR(1), \fBnotmuch-reply\fR(1),
46 \fBnotmuch-restore\fR(1), \fBnotmuch-search\fR(1),
47 \fBnotmuch-search-terms\fR(7), \fBnotmuch-show\fR(1),
48 \fBnotmuch-tag\fR(1)