notmuch ignoring alot of emails

Alvaro Herrera alvherre at alvh.no-ip.org
Mon Jul 1 08:26:21 PDT 2019


On 2019-Jun-29, David Bremner wrote:

> David Bremner <david at tethera.net> writes:
> 
> > Alvaro Herrera <alvherre at 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"


More information about the notmuch mailing list