Re: notmuch ignoring alot of emails

Subject: Re: notmuch ignoring alot of emails

Date: Mon, 1 Jul 2019 11:26:21 -0400

To: David Bremner

Cc: notmuch@notmuchmail.org, Alexei Gilchrist

From: Alvaro Herrera


On 2019-Jun-29, David Bremner wrote:

> David Bremner <david@tethera.net> writes:
> 
> > Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

> >> It's Content-Type/boundary that needs to be watched for.  Only consider
> >> that the file is an mbox if a "^From " line appears after the boundary
> >> end marker (which seems to be defined as "the boundary string followed
> >> by two dashes --").

> > I'm not keen on writing (more) ad hoc MIME parsing code, so if you can
> > phrase this in terms of GMime API (or at least MIME parts) it would be
> > great.

Yeah, I was having a look at the GMime API last week to have a think
about how to do it with that.

> On second thought, I guess it might not be practical to use GMime to parse
> the file, since that might perform badly on large mboxes.

I think we only need to search for the first end boundary; if there's
anything beyond that, return is_mbox true.  So we only need to fully
process the first email, and we can stop searching at that point.

-- 
Álvaro Herrera                                http://www.twitter.com/alvherre
"Puedes vivir sólo una vez, pero si lo haces bien, una vez es suficiente"
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: