Re: (auto-)tagging sent messages
authorservilio <servilio@gmail.com>
Tue, 26 Apr 2011 02:38:48 +0000 (22:38 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:07 +0000 (09:38 -0800)
c2/59d4d0c4a79bdec8f63ac0824cda631f545cf3 [new file with mode: 0644]

diff --git a/c2/59d4d0c4a79bdec8f63ac0824cda631f545cf3 b/c2/59d4d0c4a79bdec8f63ac0824cda631f545cf3
new file mode 100644 (file)
index 0000000..783fc58
--- /dev/null
@@ -0,0 +1,118 @@
+Return-Path: <servilio@gmail.com>\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 3B436429E26\r
+       for <notmuch@notmuchmail.org>; Mon, 25 Apr 2011 19:38:52 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, 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 Vt1YLbg3KKhU for <notmuch@notmuchmail.org>;\r
+       Mon, 25 Apr 2011 19:38:51 -0700 (PDT)\r
+Received: from mail-pw0-f53.google.com (mail-pw0-f53.google.com\r
+       [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 7FB4E431FD0\r
+       for <notmuch@notmuchmail.org>; Mon, 25 Apr 2011 19:38:51 -0700 (PDT)\r
+Received: by pwj7 with SMTP id 7so194462pwj.26\r
+       for <notmuch@notmuchmail.org>; Mon, 25 Apr 2011 19:38:49 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:mime-version:in-reply-to:references:date\r
+       :message-id:subject:from:to:cc:content-type\r
+       :content-transfer-encoding;\r
+       bh=oanNgTiZSCPHEyit0epp+qHoCa9WxxQhQvFsSxQqUpo=;\r
+       b=Mq4xeoj3AwteM+THzOyx3IMCeOe5Mx0VdOa7R5Nr4XhuR1YiJoumdjGXtR+sbNKcBC\r
+       XT5IXbWComnxnyrFb0n6sh9spc+FwSPIbXQ4wb0WggiRcbkp3r1rR0d6ykpNV7sMnosH\r
+       WGUcVakY12pXnWOHhL+IhJ8Hem9w7Pr4GL4Kw=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=mime-version:in-reply-to:references:date:message-id:subject:from:to\r
+       :cc:content-type:content-transfer-encoding;\r
+       b=BOon7MicgO7rsdrvmV2w4TrKdGsPmVHZqsxOQxw6NVTllp1AzSdQD9BNtD61vrxaNq\r
+       SuRVu8kJVadiGeIy+2UmbtkdsTJvtIHJ6kyWiuTNbEqWqsxo9TOzNBTQ+wiuhJeVDuFS\r
+       vCgixASpi0UympCKXTbtyBGB+E38vlxTdo4VU=\r
+MIME-Version: 1.0\r
+Received: by 10.68.65.78 with SMTP id v14mr322013pbs.204.1303785529105; Mon,\r
+       25 Apr 2011 19:38:49 -0700 (PDT)\r
+Received: by 10.68.58.225 with HTTP; Mon, 25 Apr 2011 19:38:48 -0700 (PDT)\r
+In-Reply-To: <BANLkTimfpvUhEf+UM_0TqwMdMTvzuUjzHw@mail.gmail.com>\r
+References: <8739ll8dkv.fsf@eve.chaoflow.net>\r
+       <87pqomgxr0.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me>\r
+       <878vv8hh3u.fsf@servo.factory.finestructure.net>\r
+       <BANLkTimfpvUhEf+UM_0TqwMdMTvzuUjzHw@mail.gmail.com>\r
+Date: Mon, 25 Apr 2011 22:38:48 -0400\r
+Message-ID: <BANLkTimubWJaPYdignzfnRPCpPefVsG1BA@mail.gmail.com>\r
+Subject: Re: (auto-)tagging sent messages\r
+From: servilio <servilio@gmail.com>\r
+To: Austin Clements <amdragon@mit.edu>\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\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: Tue, 26 Apr 2011 02:38:52 -0000\r
+\r
+On 18 April 2011 16:26, Austin Clements <amdragon@mit.edu> wrote:\r
+> On Sun, Apr 17, 2011 at 2:23 PM, Jameson Graef Rollins\r
+> <jrollins@finestructure.net> wrote:\r
+>> By giving "notmuch new" a path to a message in the store:\r
+>>\r
+>> =C2=A0notmuch new /path/to/message\r
+>>\r
+>> By feeding "notmuch new" a message on stdin, and then having it write\r
+>> the message to a specified location:\r
+>>\r
+>> =C2=A0notmuch new /path/to/maildir <message\r
+>>\r
+>> You could then add the ability to add tags at the time of index:\r
+>>\r
+>> =C2=A0notmuch new +foo +bar /path/to/message\r
+\r
+I like more the idea of using a CLI option, e.g.:\r
+\r
+notmuch new --tag=3Dfoo --tag=3Dbar /path/to/message\r
+\r
+> I think passing specific messages or directories to notmuch new would\r
+> enable some nice features; beyond immediate indexing any tagging of\r
+> sent mail, it could be combined with inotify to immediately index any\r
+> new mail\r
+\r
+I would add "efficiently", it can be done right now, but it would scan\r
+the whole mail sub-tree everytime.\r
+\r
+> However, concurrency and atomicity have to be considered carefully\r
+> with any proposal like this. =C2=A0For example,\r
+> =C2=A0notmuch new +foo +bar /path/to/message\r
+> has concurrency hazards: the caller has to store the message before\r
+> invoking notmuch new, but if the machine crashes between these two\r
+> operations, the message will be indexed with default tags on the next\r
+> notmuch new. =C2=A0Similarly, a chance unrelated invocation of notmuch ne=\r
+w\r
+> immediately after the message is stored would result in the new\r
+> message being indexed with default tags.\r
+\r
+One solution to both issues would be to add the feature to "notmuch\r
+new" of taking the initial tags from a custom header (e.g.:\r
+X-Notmuchmail-Agent-Initial-Tags), and use\r
+message-ignored-mail-headers[1] to filter this header out the sent\r
+message.\r
+\r
+Servilio\r
+\r
+[1] http://www.gnu.org/software/emacs/manual/html_mono/message.html#Mail-He=\r
+aders\r