Parsing regression with gmime-2.6?

Jameson Graef Rollins jrollins at finestructure.net
Thu Mar 8 13:32:44 PST 2012


On Thu, 08 Mar 2012 15:30:21 -0500, Daniel Kahn Gillmor <dkg at fifthhorseman.net> wrote:
> This does seem to be a regression in gmime 2.6.  I've reported the bug
> upstream, along with a simplified (non-notmuch) demonstration:
> 
>  https://bugzilla.gnome.org/show_bug.cgi?id=671680
> 
> We'll see what gmime's upstream has to say about it.

Thanks so much for following up on this, Daniel.

> As a devil's advocate, i could argue that a message in a maildir that
> starts with a "From " line isn't a proper e-mail message in the first
> place, and therefore gmime 2.6 is being more rigorously correct about
> what it accepts.  In particular, if a user were to place a multi-message
> mbox file in their notmuch message store, i think that notmuch linked
> against 2.4 would happily index only the first message of it, and the
> rest of the message would be "hidden", whereas gmime 2.6 allows us to
> detect these failures and avoid indexing them directly.

I actually agree with this position.  mbox files are not proper email
messages, so if gmime does not explicitly support parsing them then we
really can't expect it to parse them.  We *can* expect gmime to return
some sort of proper error message/return code/etc and not fail in a bad
way, but beyond that I think the burden is on us.

> That said, i understand that this is probably not an entirely rare
> situation, and i lean toward the idea that gmime 2.4's behavior was
> actually the Right Thing.  Also, I haven't been able to find any
> explicit documentation to indicate that the behavior change was
> a deliberate one.

And I think I don't agree with this one: I not think that handling mbox
files in the way you've outlined above is the Right Thing.  Only
partially parsing an mbox file, by indexing only the first message for
instance, seems like a bad solution to me, and one that's likely to lead
to a lot of confusion (e.g. "where are the rest of the messages that
were in my mbox?").

If notmuch encounters an mbox file in the store it should just skip the
message and continue, while indicating that it is skipping the message
because it's not a proper email message, as it does with other non-email
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/787f737a/attachment.pgp>


More information about the notmuch mailing list