Re: Using procmail to set tags
authorRobert Horn <rjhorn@alum.mit.edu>
Fri, 18 May 2012 14:48:08 +0000 (10:48 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:13 +0000 (09:47 -0800)
63/aac8222566b9b26625ee7efd9dc1d34651c585 [new file with mode: 0644]

diff --git a/63/aac8222566b9b26625ee7efd9dc1d34651c585 b/63/aac8222566b9b26625ee7efd9dc1d34651c585
new file mode 100644 (file)
index 0000000..a0df048
--- /dev/null
@@ -0,0 +1,76 @@
+Return-Path: <rjhorn@alum.mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BFED4431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 18 May 2012 07:48:11 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 5BxoDMQuQSyg for <notmuch@notmuchmail.org>;\r
+       Fri, 18 May 2012 07:48:10 -0700 (PDT)\r
+Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7136D431FAE\r
+       for <notmuch@notmuchmail.org>; Fri, 18 May 2012 07:48:10 -0700 (PDT)\r
+Received: from quad.robs.office (panix2.panix.com [166.84.1.2])\r
+       by mailbackend.panix.com (Postfix) with ESMTP id ED0702EDAB;\r
+       Fri, 18 May 2012 10:48:08 -0400 (EDT)\r
+From: Robert Horn <rjhorn@alum.mit.edu>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: Using procmail to set tags\r
+In-Reply-To: <m21umllfuk.fsf@guru.guru-group.fi>\r
+References: <m3vcjyl4kg.fsf@quad.robs.office> <20120515132238.GO11804@mit.edu>\r
+       <m21umllfuk.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.13 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-suse-linux-gnu)\r
+Date: Fri, 18 May 2012 10:48:08 -0400\r
+Message-ID: <m362btv93r.fsf@quad.robs.office>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 18 May 2012 14:48:11 -0000\r
+\r
+Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+\r
+> On Tue, May 15 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
+>   * execute notmuch new\r
+>   * use the environment variables in post-new hook \r
+>       (notmuch tags $NEW_TAGS -new tag:new)\r
+>\r
+Thanks to all, that gave me enough hints to make progress.\r
+\r
+It looks like adding a new tag in the config, "needsProcessing", and\r
+then a post-new hook to a script that I write should do the job.\r
+Instead of dealing an even more complex and arcane procmail setup, I\r
+write a script that runs as the post-new hook.  I'm finding the "new"\r
+flagging works correctly for simple mail drop from postfix, so the extra\r
+flag will work.  I don't want to work off "new" because that's also\r
+useful for mail reading and other uses.  The post-new hook can start by\r
+finding the emails that are tagged "needsProcessing", parse and tag them\r
+appropriately, and remove the needsProcessing tag.  It just needs to\r
+start with a query and be written to work on all the messages found, so it\r
+doesn't matter how many are new.\r
+\r
+At the moment it looks like a simple python script using the notmuch\r
+library binding may be easiest. If not, there are other tools to do the\r
+job.\r
+\r
+R Horn\r
+rjhorn@alum.mit.edu\r