Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BAA3C429E21 for ; Sun, 4 Dec 2011 08:46:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ED3IQJpzqtq9 for ; Sun, 4 Dec 2011 08:46:41 -0800 (PST) Received: from socrates.hocat.ca (socrates.hocat.ca [76.10.188.53]) by olra.theworths.org (Postfix) with ESMTP id C20FF429E25 for ; Sun, 4 Dec 2011 08:46:41 -0800 (PST) Received: from hermes.hocat.ca (hermes.hocat.ca [69.165.170.253]) by socrates.hocat.ca (Postfix) with SMTP id 7987D20DC; Sun, 4 Dec 2011 09:46:39 -0700 (MST) Received: (nullmailer pid 11468 invoked by uid 1000); Sun, 04 Dec 2011 16:46:38 -0000 From: Tom Prince To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH v2 2/2] cli: add support for pre and post notmuch new hooks In-Reply-To: <6ccaa31da55b0dfc9e339780e43e24e1489235e8.1322953841.git.jani@nikula.org> References: <7fbe6befcf31881a9bca672f55b93501249a220c.1322859389.git.jani@nikula.org> <6688b09fffa2a66b496af78008102f88ab4e9450.1322953841.git.jani@nikula.org> <6ccaa31da55b0dfc9e339780e43e24e1489235e8.1322953841.git.jani@nikula.org> User-Agent: Notmuch/0.10.1 (http://notmuchmail.org) Emacs/23.3.3 (x86_64-pc-linux-gnu) Date: Sun, 04 Dec 2011 11:46:38 -0500 Message-ID: <877h2cgu8h.fsf@hermes.hocat.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2011 16:46:45 -0000 On Sun, 4 Dec 2011 01:16:49 +0200, Jani Nikula 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