From: Tomi Ollila Date: Sun, 25 Nov 2012 13:26:58 +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=f5f81517f394df0f9157c6fe6efea4262c2bdade;p=notmuch-archives.git Re: [PATCH 3/3] lib: Reject multi-message mboxes and deprecate single-message mbox --- diff --git a/bd/735188bca4f9650642fdeabf07bb5f2c9ca8a2 b/bd/735188bca4f9650642fdeabf07bb5f2c9ca8a2 new file mode 100644 index 000000000..cd84d268c --- /dev/null +++ b/bd/735188bca4f9650642fdeabf07bb5f2c9ca8a2 @@ -0,0 +1,89 @@ +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 CE164431FAF + for ; Sun, 25 Nov 2012 05:27:02 -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 8-abMAbAVlim for ; + Sun, 25 Nov 2012 05:27:02 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id DD48A431FAE + for ; Sun, 25 Nov 2012 05:27:01 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 975801000E5; + Sun, 25 Nov 2012 15:26:58 +0200 (EET) +From: Tomi Ollila +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH 3/3] lib: Reject multi-message mboxes and deprecate + single-message mbox +In-Reply-To: <1353824161-31717-3-git-send-email-amdragon@mit.edu> +References: <1353824161-31717-1-git-send-email-amdragon@mit.edu> + <1353824161-31717-3-git-send-email-amdragon@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 +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 13:27:03 -0000 + +On Sun, Nov 25 2012, Austin Clements wrote: + +> 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. + + +The series looks good to me -- but I don't know about deprecating +single-message mboxes: + +* If we someday support (read-only?) mbox format, then single-message + mboxes are "normal" again. + +* 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 th= +is + +* 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 (**) + +(*) my "mb2md" wannabe does gnus-like "$formail" -bz -R 'From ' X-From-Line= +: ... + +(**) Something like the following could be used to mangle "single-file mbox= +es"... + 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... >;) + + +Tomi