Re: [PATCH] mime_node_open: check if the file is in mbox format, and inform gmime.

Subject: Re: [PATCH] mime_node_open: check if the file is in mbox format, and inform gmime.

Date: Thu, 08 Mar 2012 14:05:40 -0800

To: David Bremner, notmuch@notmuchmail.org

Cc: David Bremner

From: Jameson Graef Rollins


On Thu,  8 Mar 2012 17:48:15 -0400, David Bremner <david@tethera.net> wrote:
> From: David Bremner <bremner@debian.org>
> 
> It seems that it has always been an error to try to parse an mbox
> format file with gmime without calling g_mime_parser_set_scan_from.
> 
> This change reads the first 5 bytes of the file, and if they are "From ",
> declares the file to be an mbox.
> ---
> 
> This patch seems to fix the problem for me. I don't think the
> performance impact should be too bad, but I didn't really test it.

As I've stated previously in this thread, I think this behavior is a
mistake.  This will not result in a proper parsing of an mbox file, and
improper or incomplete parsing of mbox files will lead to bad/confusing
behavior.

We should either completely support mbox files or not support them.
Partial support is, imho, a recipe for disaster.  We don't currently
support them, and it would take a lot of extra work to do so completely.
I don't see any harm in just telling users to convert their mbox files
into proper message files.

jamie.
part-000.sig (application/pgp-signature)

Thread: