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 14C29431FBF for ; Fri, 18 Dec 2009 03:54:29 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 q79ewAOAJnOM for ; Fri, 18 Dec 2009 03:54:28 -0800 (PST) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by olra.theworths.org (Postfix) with ESMTP id 6EEA8431FAE for ; Fri, 18 Dec 2009 03:54:28 -0800 (PST) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id B0402C6FC8; Fri, 18 Dec 2009 06:54:27 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 18 Dec 2009 06:54:27 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=smtpout; bh=HHNSXe/IWC4RD7iaThHPjOe4CXs=; b=CQiExHmLt8P34MTqL7nN/hXbvS6XfCXfSsWRwW4HEbR8utyo+78jhCEt6prDksv0BVJ8YvkqoKfOyfQTIRg0UaLa+OqXaW7T2tr4u064x//ruurY7wRYCW4JhjnYMtuqoYhVOSi4Q/O8Zo+WleYvNuoMwlRTI+dz2hZhSPGmy/Y= X-Sasl-enc: 5twjOOISVWsMi3yYY1NvlEnkpbwkgPYJtygH5zlvho/U 1261137266 Received: from veldthuis.com (marten.rgoc.rug.nl [129.125.147.35]) by mail.messagingengine.com (Postfix) with ESMTPSA id 246655B51; Fri, 18 Dec 2009 06:54:26 -0500 (EST) Received: by veldthuis.com (sSMTP sendmail emulation); Fri, 18 Dec 2009 12:54:39 +0100 From: Marten Veldthuis To: Alex Ghitza , notmuch@notmuchmail.org In-Reply-To: <54aaxg5xyl.fsf@gmail.com> References: <54aaxg5xyl.fsf@gmail.com> Date: Fri, 18 Dec 2009 12:54:39 +0100 Message-ID: <878wd0a45c.fsf@veldthuis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] automatically assigning tags to new messages? X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Fri, 18 Dec 2009 11:54:29 -0000 On Fri, 18 Dec 2009 22:21:54 +1100, Alex Ghitza wrote: > I heard about notmuch mail a few days ago and I started playing with > it. So far, it makes me very happy, but there are some things that I > need to learn how to do. I'll start with the most important one: > tagging incoming messages automatically. I've got a script somewhere which I invoke after each mail sync. I'll give some examples from that for your list below. > What is the recommended way of achieving this? There is a variety of > things that I would like to automatically do to incoming mail: > - if it comes from a mailing list (e.g. notmuch), tag it +notmuch and > +unread, but not +inbox notmuch tag +list +notmuch -inbox to:notmuch@notmuchmail.org and not tag:notmuch and tag:inbox > - if it's one of the numerous pointless weekly newsletters that I'm > getting from my university, tag it +unimelb, but not +unread or > +inbox notmuch tag +unimelb -unread -inbox to:foo and not tag:unimelb and tag:unread and tag:inbox > - if it is coming from me, tag it +sent, but not +unread or +inbox Not quite sure. Currently I'm not doing this, don't know if this is possible within a single incantation of notmuch-tag. I think you probably need a first search to get message ids, and then tag only those message ids (doing it like the others above would tag all messages in the thread with sent, which is probably not what you want). -- - Marten