[PATCH 3/3] lib: Reject multi-message mboxes and deprecate single-message mbox

Tomi Ollila tomi.ollila at iki.fi
Sun Nov 25 05:26:58 PST 2012


On Sun, Nov 25 2012, Austin Clements <amdragon at MIT.EDU> 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ïve mb2md scripts could leave the 'From ' -line intact: for
  example `formail -bz -s head -3 < $MAIL`(*) can be used to demonstrate this

* 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 mboxes"...
     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:"; }}' 
     This breaks the multi-message mbox nicely... >;)


Tomi


More information about the notmuch mailing list