Re: [PATCH 3/3] lib: Reject multi-message mboxes and deprecate single-message mbox
authorAustin Clements <amdragon@MIT.EDU>
Sun, 25 Nov 2012 18:05:24 +0000 (13:05 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:59 +0000 (09:50 -0800)
6f/a480402c76069f9784d28a50a2285495bf4e9d [new file with mode: 0644]

diff --git a/6f/a480402c76069f9784d28a50a2285495bf4e9d b/6f/a480402c76069f9784d28a50a2285495bf4e9d
new file mode 100644 (file)
index 0000000..b131363
--- /dev/null
@@ -0,0 +1,132 @@
+Return-Path: <amdragon@mit.edu>\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 0882A431FAF\r
+       for <notmuch@notmuchmail.org>; Sun, 25 Nov 2012 10:05:29 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 xEH+0VN3TK5i for <notmuch@notmuchmail.org>;\r
+       Sun, 25 Nov 2012 10:05:28 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU\r
+       [18.9.25.15])\r
+       by olra.theworths.org (Postfix) with ESMTP id 6C2F7431FAE\r
+       for <notmuch@notmuchmail.org>; Sun, 25 Nov 2012 10:05:28 -0800 (PST)\r
+X-AuditID: 1209190f-b7f636d00000095b-b6-50b25de779a5\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 13.5A.02395.7ED52B05; Sun, 25 Nov 2012 13:05:27 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qAPI5QrZ000959; \r
+       Sun, 25 Nov 2012 13:05:27 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qAPI5OJs007864\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Sun, 25 Nov 2012 13:05:26 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Tcga4-0003M8-Np; Sun, 25 Nov 2012 13:05:24 -0500\r
+Date: Sun, 25 Nov 2012 13:05:24 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>\r
+Subject: Re: [PATCH 3/3] lib: Reject multi-message mboxes and deprecate\r
+       single-message mbox\r
+Message-ID: <20121125180524.GL4562@mit.edu>\r
+References: <1353824161-31717-1-git-send-email-amdragon@mit.edu>\r
+       <1353824161-31717-3-git-send-email-amdragon@mit.edu>\r
+       <m2y5hpu82l.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=iso-8859-1\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To: <m2y5hpu82l.fsf@guru.guru-group.fi>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrBKsWRmVeSWpSXmKPExsUixG6novs8dlOAwcFzFhbXb85ktnizch6r\r
+       A5PH4a8LWTyerbrFHMAUxWWTkpqTWZZapG+XwJXxccd0loIrQhXrtjcxNjDe5uti5OSQEDCR\r
+       6HzXwAZhi0lcuLceyObiEBLYxyixce0ERghnA6PEivv/oTIXmSTWnL0AlVnCKNGx+BojSD+L\r
+       gKrE36nvmEFsNgENiW37l4PFRQRUJB60rWcFsZkFpCW+/W5mArGFBWIl/j9eDGbzCmhLtBzd\r
+       zAIxdC6jxLaZL1kgEoISJ2c+YYFo1pHYufUO0BkcYIOW/+OACMtLNG+dzQwS5hQwkDjzIgQk\r
+       LAq0dsrJbWwTGIVnIRk0C8mgWQiDZiEZtICRZRWjbEpulW5uYmZOcWqybnFyYl5eapGuiV5u\r
+       ZoleakrpJkZQJHBK8u9g/HZQ6RCjAAejEg/vjcSNAUKsiWXFlbmHGCU5mJREeUWAcSTEl5Sf\r
+       UpmRWJwRX1Sak1p8iFGCg1lJhHciE1CONyWxsiq1KB8mJc3BoiTOezXlpr+QQHpiSWp2ampB\r
+       ahFMVoaDQ0mCVxRkqGBRanpqRVpmTglCmomDE2Q4D9BwVZAa3uKCxNzizHSI/ClGXY45M9uf\r
+       MAqx5OXnpUqJ8/KDFAmAFGWU5sHNgSWwV4ziQG8J826OAariASY/uEmvgJYwAS1Jvr4RZElJ\r
+       IkJKqoFR+FKBi84ejZtdF0v3/3R8vfhw1j0WISO+WVxLns5s8rnK2csblat178BVxtnvLpZ0\r
+       BL1Y9EjlSvH13UdFlOpM+Tf2uld19gSfmlSm6mLwI0tb6pLptpV797zVyFE8OmFlV6qx9OGv\r
+       aYci7c3jI+8cnjLJ6NiVH9pyjwtnTF5g3eix5OiJeTVhSizFGYmGWsxFxYkA5hbVGDsDAAA=\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: Sun, 25 Nov 2012 18:05:29 -0000\r
+\r
+Quoth Tomi Ollila on Nov 25 at  3:26 pm:\r
+> On Sun, Nov 25 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> \r
+> > Previously, we would treat multi-message mboxes as one giant email,\r
+> > which, besides the obvious incorrect indexing, often led to\r
+> > out-of-memory errors for archival mboxes.  Now we explicitly reject\r
+> > multi-message mboxes.  For historical reasons, we retain support for\r
+> > single-message mboxes, but official deprecate this behavior.\r
+> \r
+> \r
+> The series looks good to me -- but I don't know about deprecating\r
+> single-message mboxes:\r
+> \r
+> * If we someday support (read-only?) mbox format, then single-message\r
+>   mboxes are "normal" again.\r
+\r
+If notmuch does gain mbox support, then its handling of single-message\r
+mboxes will *definitely* change because it will stop doing\r
+maildir-like things to them (flag sync, moving from new to cur, etc),\r
+which people may currently be depending on.  This was one of the\r
+motivations for deprecating the current handling of single-message\r
+mboxes.\r
+\r
+> * Some naïve mb2md scripts could leave the 'From ' -line intact: for\r
+>   example `formail -bz -s head -3 < $MAIL`(*) can be used to demonstrate this\r
+\r
+I would call that "buggy", rather than "naïve".  ]:--8)\r
+\r
+> * Some people may have large collection of single-file messages starting\r
+>   with 'From ' currently indexed. If those are to be re-indexed later\r
+>   without "single-message mbox" support that is somewhat of a burden to\r
+>   the users (**)\r
+\r
+That's why this only deprecates them (with a warning) and doesn't drop\r
+support for them.  The idea is to keep the historical handling for a\r
+few releases and then we'll have the flexibility to do what we want\r
+with single-message mboxes (including supporting them as real mbox).\r
+\r
+It's probably a good idea to include a script or a wiki pointer for\r
+fixing single-message mboxes in the NEWS.  As long as the file name is\r
+kept the same, notmuch won't reindex it.\r
+\r
+> (*) my "mb2md" wannabe does gnus-like "$formail" -bz -R 'From ' X-From-Line: ...\r
+> \r
+> (**) Something like the following could be used to mangle "single-file mboxes"...\r
+>      find . -type f | xargs perl -e 'foreach (@ARGV) { open IO, "+<", $_ or\r
+>      next; sysread IO, $buf, 5; if ($buf eq "From ") { sysseek IO, 0, 0;\r
+>      syswrite IO, "Fro:"; }}' \r
+>      This breaks the multi-message mbox nicely... >;)\r
+> \r
+> \r
+> Tomi\r