[RFC PATCH 00/14] modular mail stores based on URIs
authorEthan Glasser-Camp <ethan.glasser.camp@gmail.com>
Mon, 25 Jun 2012 20:41:25 +0000 (16:41 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:48 +0000 (09:47 -0800)
90/f2c80b02ab080892d44fa10bf3b4cc15db895a [new file with mode: 0644]

diff --git a/90/f2c80b02ab080892d44fa10bf3b4cc15db895a b/90/f2c80b02ab080892d44fa10bf3b4cc15db895a
new file mode 100644 (file)
index 0000000..8a20d1c
--- /dev/null
@@ -0,0 +1,91 @@
+Return-Path: <ethan.glasser.camp@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 E70D0431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:42:03 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.061\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.061 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_BL_SPAMCOP_NET=1.246,\r
+       RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=0.614] 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 etYpz1mvgVZv for <notmuch@notmuchmail.org>;\r
+       Mon, 25 Jun 2012 13:42:03 -0700 (PDT)\r
+Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com\r
+ [74.125.82.45])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ DEA6E431FAF   for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:42:02 -0700\r
+ (PDT)\r
+Received: by wgbdt14 with SMTP id dt14so3702167wgb.2\r
+       for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:42:01 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:subject:date:message-id:x-mailer;\r
+       bh=RaH7ALy2EvXXsJ0kTVpbL/8cRdvGWoxTlwrSJ6urX9g=;\r
+       b=KWIpgHQ4iA2AB5+p47f4RUnlF3zdGYVeFodXyna0XrPge9JpMkRICA52ASbMFyXloK\r
+       cuSKFmZpBlJMN3/hwU4rNXrDUUxnZL8IA1az4Y4sqezra1pL5dgd3rrnykN1SLHNK9v+\r
+       C5hu7tdQBsAB8G8EJdtS4iI0oMMcW+qKElWcyKSjwmfhbyK+GscNQo1lIwlXTd3eZJmz\r
+       cwiTV21WXLvDdl2s16B6oR2mIp7duIVEkDZe+gQlzd53fn1h3ANa59DEW4UvdaoFwBV0\r
+       7QS/jIjtuO9TBFdDq//SVHQAV9mP1PJJUos105M2ie24rBhCHaF5xk6s1usOkJiltj/L\r
+       uQWw==\r
+Received: by 10.180.93.99 with SMTP id ct3mr27120427wib.13.1340656919909;\r
+       Mon, 25 Jun 2012 13:41:59 -0700 (PDT)\r
+Received: from localhost ([195.24.209.21])\r
+       by mx.google.com with ESMTPS id eu4sm11406143wib.2.2012.06.25.13.41.55\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 25 Jun 2012 13:41:59 -0700 (PDT)\r
+From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH 00/14] modular mail stores based on URIs\r
+Date: Mon, 25 Jun 2012 16:41:25 -0400\r
+Message-Id: <1340656899-5644-1-git-send-email-ethan@betacantrips.com>\r
+X-Mailer: git-send-email 1.7.9.5\r
+X-Mailman-Approved-At: Tue, 26 Jun 2012 03:51:54 -0700\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: Mon, 25 Jun 2012 20:42:04 -0000\r
+\r
+Hi guys,\r
+\r
+Sorry for dropping off the mailing list after I sent my last patch series (http://notmuchmail.org/pipermail/notmuch/2012/009470.html). I haven't had the time or a stable enough email address to really follow notmuch development :)\r
+\r
+I signed onto #notmuch a week or two ago and asked what I would need to do to get a feature like this one into mainline. j4ni told me that he agreed with the feedback to my original patch series, and suggested that I follow mjw1009's advice of having filenames encode all information about mail storage transparently, and that this would solve the problem with the original patch series of sprinkling mail storage parameters all over the place. bremner suggested that he had been thinking about how to support mbox or other multiple-message archives, and also commented that he wasn't crazy about so much of the API being in strings.\r
+\r
+Based on this advice, I decided to revise my approach to this patchset, one that is based around the stated desire to work with mbox formats. This approach, in contrast to the mailstore approach that Michal Sojka proposed and I revised, encodes all mail access information as URIs. These URIs are stored in Xapian the way that relative paths are right now. Examples might be:\r
+\r
+    maildir:///home/ethan/Mail/folder/cur/filename:2,S\r
+    mbox:///home/ethan/Mail/folder/file.mbox#byte-offset+lenght\r
+    couchdb://ethan:password@localhost:8080/some-doc-id\r
+\r
+Personally, this isn't my favorite approach, for the following reasons:\r
+\r
+1. Notmuch, at some point in its history, chose to store file paths relative to a "mail database", with the intent that if this mail database was moved, filenames would not change and everything would Just Work (tm). The above scheme completely reverses this design decision, and in general completely breaks this relocatability. I don't see any easy way to handle this problem. This isn't just a wishlist feature; at least two things in the test suite (caching of corpus.mail, and the atomicity tests) rely on this behavior.\r
+\r
+2. Mail access information, i.e. open connections, etc. can only be stored in variables global to the mailstore code, and cannot be stored as private members of a mailstore object. This is more an aesthetic concern than a functional one.\r
+\r
+Anyhow, the following (enormous) patch series implement this design. I used uriparser as an external library to parse URIs. The API for this library is a little idiosyncratic. uriparser supports parsing Unicode URIs (strings of wchar_t), but I just used ASCII filenames because I think that's what comes out of Xapian.\r
+\r
+Patch 11 is borrowed directly from the last patch series.\r
+\r
+The last four or five patches add mbox support, including a few tests. That part of the series is still very first-draft: I added a new config option to specify URIs to scan, and ">From " lines still need to be unescaped. However, we support scanning mbox files whether messages have content-length or not.\r
+\r
+I will try to receive feedback on this series more gratefully than the last one. :)\r
+\r
+Thanks again for your time,\r
+\r
+Ethan\r
+\r