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

Jameson Graef Rollins jrollins at finestructure.net
Thu Mar 8 14:05:40 PST 2012


On Thu,  8 Mar 2012 17:48:15 -0400, David Bremner <david at tethera.net> wrote:
> From: David Bremner <bremner at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120308/99046603/attachment.pgp>


More information about the notmuch mailing list