Using procmail to set tags

Jani Nikula jani at nikula.org
Tue May 15 03:57:54 PDT 2012


On Tue, 15 May 2012 11:14:50 +0100, bryan hunt <mafubryan at gmail.com> wrote:
> On Mon, 2012-05-14 at 19:34 -0400, Robert Horn wrote:
> > Is it practical (and has anyone documented) using a procmail setup to
> > set initial tags for messages using notmuch?
> > 
> > I've just started using emacs-notmuch to read mail, and I'm using a
> > system where I have procmail filters to bin mail by category into
> > folders.  I can continue this using folder:value for searching, but one
> > reason notmuch interests me is the potential to do more.
> > 
> > It's practical for me to assign potentially overlapping tags with a more
> > sophisticated procmail setup.  Notmuch tags enable having multiple tags
> > on one email.
> > 
> > I don't know enough about the procmail/notmuch process to see just how
> > to make this happen.  I'm hoping that someone has already done something
> > similar.
> > 
> > R Horn
> > rjhorn at alum.mit.edu
> 
> You could have procmail fire a python script to add or remove tags based
> upon message content. 

Note that you need to run 'notmuch new' after the message has been
delivered in order to modify the tags. Otherwise notmuch does not know
about the message.

> The problem is that the tag removal isn't being saved. 
> I've created a bug report with the developer:
> 
> https://bitbucket.org/spaetz/cnotmuch/issue/1/removing-tags-doesnt-seem-to-be-saving

That repository is obsolete; the notmuch python bindings have been
merged into upstream notmuch. If you still have problems, please report
them on this list.


J.


More information about the notmuch mailing list