Re: [PATCH v2 2/2] cli: add support for pre and post notmuch new hooks

Subject: Re: [PATCH v2 2/2] cli: add support for pre and post notmuch new hooks

Date: Sun, 04 Dec 2011 11:46:38 -0500

To: Jani Nikula, notmuch@notmuchmail.org

Cc:

From: Tom Prince


On Sun,  4 Dec 2011 01:16:49 +0200, Jani Nikula <jani@nikula.org> wrote:
> Run notmuch new pre and post hooks, named "pre-new" and "post-new", if
> present in the notmuch hooks directory. The hooks will be run before and
> after incorporating new messages to the database.
> 
> Typical use cases for pre-new and post-new hooks are fetching or delivering
> new mail to the maildir, and custom tagging of the mail incorporated to the
> database.
> 
> Also add command line option --no-hooks to notmuch new to bypass the
> hooks.

A useful extension would be providing the list of added message-ids to the
post-new hook, one per line? Or maybe the script wants added, moved,
deleted ...

  Tom

Thread: