Re: [PATCH v2] Omit User-Agent: header by default
[notmuch-archives.git] / e5 / 4de6c44f80bb7e818358125e132f6411e1a363
1 Return-Path: <tomi.ollila@iki.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 25D39431FB6\r
6         for <notmuch@notmuchmail.org>; Tue, 15 May 2012 06:49:09 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id GoVfa+jf8U8O for <notmuch@notmuchmail.org>;\r
16         Tue, 15 May 2012 06:49:08 -0700 (PDT)\r
17 X-Greylist: delayed 345 seconds by postgrey-1.32 at olra;\r
18         Tue, 15 May 2012 06:49:07 PDT\r
19 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
20         by olra.theworths.org (Postfix) with ESMTP id DB62D431FAE\r
21         for <notmuch@notmuchmail.org>; Tue, 15 May 2012 06:49:07 -0700 (PDT)\r
22 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
23         id AB0BD10063A; Tue, 15 May 2012 16:43:31 +0300 (EEST)\r
24 From: Tomi Ollila <tomi.ollila@iki.fi>\r
25 To: Austin Clements <amdragon@MIT.EDU>, Robert Horn <rjhorn@alum.mit.edu>\r
26 Subject: Re: Using procmail to set tags\r
27 In-Reply-To: <20120515132238.GO11804@mit.edu>\r
28 References: <m3vcjyl4kg.fsf@quad.robs.office> <20120515132238.GO11804@mit.edu>\r
29 User-Agent: Notmuch/0.13~rc1+22~g672e3f0 (http://notmuchmail.org) Emacs/23.1.1\r
30         (x86_64-redhat-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Tue, 15 May 2012 16:43:31 +0300\r
35 Message-ID: <m21umllfuk.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=us-ascii\r
38 Cc: notmuch@notmuchmail.org\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Tue, 15 May 2012 13:49:09 -0000\r
52 \r
53 On Tue, May 15 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
54 \r
55 >\r
56 > Alternatively, you can have procmail record the message ID and desired\r
57 > tags of the message in a file and then apply those recorded tags in\r
58 > your post-new hook.  This would achieve the tagging you want more\r
59 > directly, without mixing in folders and multiple delivery.  The\r
60 > difficulty would be getting a message ID you could later use in an id:\r
61 > query.  Simply grabbing the value of the message-id header would work\r
62 > most of the time, but there's a fair bit of logic for dealing with\r
63 > strangely formed or completely malformed message-id headers\r
64 > (see _parse_message_id).\r
65 \r
66 If procmail is delivering one mail at a time (without parallerism) and\r
67 notmuch new is executed after each email delivered one could try\r
68 \r
69   * put desired tags into environment (export NEW_TAGS='+foo +bar')\r
70   * execute notmuch new\r
71   * use the environment variables in post-new hook \r
72       (notmuch tags $NEW_TAGS -new tag:new)\r
73 \r
74 The risk with this approach (when not recording message-id) is that there\r
75 ie not just one new mail (with 'new' tag) delivered...\r
76 \r
77 Then I sidedtacked to... wouldn't something like\r
78          notmuch new +<tags> -<tags> [path/to/filename]\r
79 be so cool... ;) (yes, so non-trivial...)\r
80 \r
81 >\r
82 > As far as I know, nobody has tried my second suggestion.  Most people\r
83 > just switch to using notmuch queries (either to tag or simply to\r
84 > search).\r
85 \r
86 Tomi\r