From: Tomi Ollila Date: Sun, 25 Nov 2012 19:57:27 +0000 (+0200) Subject: Re: [PATCH 3/3] lib: Reject multi-message mboxes and deprecate single-message mbox X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=7ed5e3045484c07b449f94d460724672bfcc3929;p=notmuch-archives.git Re: [PATCH 3/3] lib: Reject multi-message mboxes and deprecate single-message mbox --- diff --git a/a5/f8c103f862ffda247482a9b784453e11db02eb b/a5/f8c103f862ffda247482a9b784453e11db02eb new file mode 100644 index 000000000..8f651b55d --- /dev/null +++ b/a5/f8c103f862ffda247482a9b784453e11db02eb @@ -0,0 +1,122 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 281CE431FAF + for ; Sun, 25 Nov 2012 11:57:32 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id WRXGTWETo4JC for ; + Sun, 25 Nov 2012 11:57:31 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 1AEB8431FAE + for ; Sun, 25 Nov 2012 11:57:31 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id E5D531000E5; + Sun, 25 Nov 2012 21:57:27 +0200 (EET) +From: Tomi Ollila +To: Austin Clements +Subject: Re: [PATCH 3/3] lib: Reject multi-message mboxes and deprecate + single-message mbox +In-Reply-To: <20121125180524.GL4562@mit.edu> +References: <1353824161-31717-1-git-send-email-amdragon@mit.edu> + <1353824161-31717-3-git-send-email-amdragon@mit.edu> + <20121125180524.GL4562@mit.edu> +User-Agent: Notmuch/0.14+84~g8a199bf (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 25 Nov 2012 19:57:32 -0000 + +On Sun, Nov 25 2012, Austin Clements wrote: + +> Quoth Tomi Ollila on Nov 25 at 3:26 pm: +>> On Sun, Nov 25 2012, Austin Clements wrote: +>>=20 +>> > Previously, we would treat multi-message mboxes as one giant email, +>> > which, besides the obvious incorrect indexing, often led to +>> > out-of-memory errors for archival mboxes. Now we explicitly reject +>> > multi-message mboxes. For historical reasons, we retain support for +>> > single-message mboxes, but official deprecate this behavior. +>>=20 +>>=20 +>> The series looks good to me -- but I don't know about deprecating +>> single-message mboxes: +>>=20 +>> * If we someday support (read-only?) mbox format, then single-message +>> mboxes are "normal" again. +> +> If notmuch does gain mbox support, then its handling of single-message +> mboxes will *definitely* change because it will stop doing +> maildir-like things to them (flag sync, moving from new to cur, etc), +> which people may currently be depending on. This was one of the +> motivations for deprecating the current handling of single-message +> mboxes. +> +>> * Some na=C3=AFve mb2md scripts could leave the 'From ' -line intact: for +>> example `formail -bz -s head -3 < $MAIL`(*) can be used to demonstrate= + this +> +> I would call that "buggy", rather than "na=C3=AFve". ]:--8) +> +>> * Some people may have large collection of single-file messages starting +>> with 'From ' currently indexed. If those are to be re-indexed later +>> without "single-message mbox" support that is somewhat of a burden to +>> the users (**) +> +> That's why this only deprecates them (with a warning) and doesn't drop +> support for them. The idea is to keep the historical handling for a +> few releases and then we'll have the flexibility to do what we want +> with single-message mboxes (including supporting them as real mbox). +> +> It's probably a good idea to include a script or a wiki pointer for +> fixing single-message mboxes in the NEWS. As long as the file name is +> kept the same, notmuch won't reindex it. + +Ok, I'm convinced. +1 + +Tomi + +> +>> (*) my "mb2md" wannabe does gnus-like "$formail" -bz -R 'From ' X-From-L= +ine: ... +>>=20 +>> (**) Something like the following could be used to mangle "single-file m= +boxes"... +>> find . -type f | xargs perl -e 'foreach (@ARGV) { open IO, "+<", $_= + or +>> next; sysread IO, $buf, 5; if ($buf eq "From ") { sysseek IO, 0, 0; +>> syswrite IO, "Fro:"; }}'=20 +>> This breaks the multi-message mbox nicely... >;) +>>=20 +>>=20 +>> Tomi +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch