]> git.cworth.org Git - notmuch-wiki/commitdiff
getting-started: hooks
authorJani Nikula <jani@nikula.org>
Fri, 11 Mar 2016 12:29:06 +0000 (14:29 +0200)
committerJani Nikula <jani@nikula.org>
Fri, 11 Mar 2016 12:29:06 +0000 (14:29 +0200)
getting-started.mdwn

index dbc13ffde4ea061a6989acc8af2500ef36a87777..eb83c4ccdab5e4649717352dd6bb0a080f9a2d43 100644 (file)
@@ -87,6 +87,14 @@ There are two ways to deliver and index messages:
 
 ## Automation Via Hooks
 
+Notmuch supports running [[user defined hooks|manpages/notmuch-hooks-5]] before
+or after certain commands. Hooks can be arbitrary executable programs or
+scripts. For example, if you always run your mail delivery tool first and
+`notmuch new` after that, you can run the tool from Notmuch `pre-new` hook, and
+simply run `notmuch new` to do both. If you always do some tagging after
+indexing of new messages, you may want to set up a `post-new` or `post-insert`
+hook to do that automatically.
+
 ## Backing up and Restoring the Database
 
 ## Removing Notmuch