How does notmuch track mails?
[notmuch-archives.git] / 91 / 16248da16a7d451958b6aa7c72c5c6b22b66e9
1 Return-Path: <cworth@cworth.org>\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 7E396431FBF;\r
6         Sun, 22 Nov 2009 04:20:13 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id 3TIP26sjEBPe; Sun, 22 Nov 2009 04:20:12 -0800 (PST)\r
11 Received: from cworth.org (localhost [127.0.0.1])\r
12         by olra.theworths.org (Postfix) with ESMTP id D4646431FAE;\r
13         Sun, 22 Nov 2009 04:20:11 -0800 (PST)\r
14 From: Carl Worth <cworth@cworth.org>\r
15 To: Michiel Buddingh' <michiel@michielbuddingh.net>, notmuch@notmuchmail.org\r
16 In-Reply-To: <9bfdedddeab9c58cd45d8d448323d0fc@localhost>\r
17 References: <87fx8bygi7.fsf@linux.vnet.ibm.com>\r
18         <87bpiv4t9h.fsf@yoom.home.cworth.org>\r
19         <87y6lz39nd.fsf@yoom.home.cworth.org>\r
20         <20091121221207.GB17268@jukie.net>\r
21         <9cce5525b093b87fe74d427954ffad89@localhost>\r
22         <87d43b2oif.fsf@yoom.home.cworth.org>\r
23         <9bfdedddeab9c58cd45d8d448323d0fc@localhost>\r
24 Date: Sun, 22 Nov 2009 13:19:57 +0100\r
25 Message-ID: <87fx86g39u.fsf@yoom.home.cworth.org>\r
26 MIME-Version: 1.0\r
27 Content-Type: text/plain; charset=us-ascii\r
28 Subject: Re: [notmuch] [PATCH] notmuch: Add Maildir directory name as tag\r
29  name for messages\r
30 X-BeenThere: notmuch@notmuchmail.org\r
31 X-Mailman-Version: 2.1.12\r
32 Precedence: list\r
33 List-Id: "Use and development of the notmuch mail system."\r
34         <notmuch.notmuchmail.org>\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
36         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
38 List-Post: <mailto:notmuch@notmuchmail.org>\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
42 X-List-Received-Date: Sun, 22 Nov 2009 12:20:13 -0000\r
43 \r
44 [quick reply to the text without looking at the patch yet]\r
45 \r
46 On Sun, 22 Nov 2009 10:33:53 +0100, Michiel Buddingh' <michiel@michielbuddingh.net> wrote:\r
47 > Thanks, and apologies for the accidental base64 encoding.\r
48 \r
49 Thanks for noticing. That would have been a tricky patch to reply to to\r
50 comment on.\r
51 \r
52 > On the positive side, this allows us to map these flags onto tags,\r
53 > at least for indexing (the patch at the bottom implements this), and,\r
54 > if I can pry you away from your principles, later for modification\r
55 > as well.\r
56 \r
57 Yes, we might end up doing this. We'll see.\r
58 \r
59 > I respect your desire to stick to that principle.  But I also know \r
60 > that purity and simplicity, generally speaking, are unattainable\r
61 > luxuries for most applications that handle mail.\r
62 \r
63 Hehe. Thanks for the entertainment. You sound like someone who's already\r
64 got some of the battle scars from trying to write mail-handling\r
65 software. One is certainly forced to see an awful lot of awfully strange\r
66 things.\r
67 \r
68 > Another thing; notmuch currently indexes by message-id (or SHA-1 hash\r
69 > if that is not present).  Maildir, on the other hand, uses file names\r
70 > as stable (when stripped of the parts trailing the colon) unique \r
71 > (knock on wood) identifiers.  A Maildir-aware notmuch could incorporate\r
72 > this to be far more resistant to bulk mail moves done by other clients,\r
73 > by using filename lookups to avoid accessing and parsing the mail \r
74 > files themselves.\r
75 \r
76 I don't think opening a file to read out a message ID will ever be a\r
77 bottleneck. But yes, we could take advantage of the unique name if we\r
78 insisted that the storage have it.\r
79 \r
80 Personally, I still regularly end up indexing stuff that's not in proper\r
81 maildir format, (like just manually copying a mail file "foo" down into\r
82 a directory that I know isn't being delivered to by any MDA but that I\r
83 want notmuch to index.) Maybe that's just me, because I'm always\r
84 bringing up little things for debugging, etc. But it is convenient at\r
85 least.\r
86 \r
87 So I think I'd like to be careful to avoid notmuch ever *requiring*\r
88 maildir storage. (But yes, it should obviously support maildir well\r
89 since it's so common.)\r
90 \r
91 > I should re-iterate that I'm new to notmuch, and it's obvious that I'm\r
92 > trying to beat it into becoming something it was never intended to be;\r
93 \r
94 Actually, I don't think that's true at all. Notmuch is definitely\r
95 intended to become a lot more than it is right now. And if it's not\r
96 making it easy for you to deal with mail the way you'd like to, then\r
97 we definitely do want to look into expanding notmuch to be able to\r
98 address that.\r
99 \r
100 > on the other hand, I'd like people to chime in on this.\r
101 \r
102 I've got the patch tagged to give a closer look at it later.\r
103 \r
104 Thanks again,\r
105 \r
106 -Carl\r