<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<blockquote style="border-left:2px solid #5855D5; color:#5855D5; margin:0 0 5px; padding-left:5px">
<blockquote style="border-left:2px solid #5855D5; color:#00AFCC; margin:0 0 5px; padding-left:5px; border-left-color:#00AFCC">
<p dir="auto">When I run notmuch I get a bunch (hundreds) of emails that are ignored<br>
with:</p>

<p dir="auto">Note: Ignoring non-mail file: ...</p>

<p dir="auto">The files are valid maildir files but have a paragraph somewhere in the<br>
body where someone has written "From ".</p>
</blockquote>

<p dir="auto">And do they also have have a line starting with "From " as the first<br>
line? This makes them mbox files. The second "From " makes them mbox<br>
files with multiple messages. Notmuch thinks your MDA (the thing that<br>
made those files) is misconfigured, assuming my guess about the format<br>
is correct.</p>
</blockquote>

<p dir="auto">Every message file begins with “From “. This is true of all messages downloaded by both offlineimap (with type = Maildir) and mbsync. <br>
neomutt has no issues dealing with these files as maildir and mu has no issues indexing them either. I’m assuming that stating with “From “ is part of the maildir spec.</p>

<p dir="auto">The problem occurs specifically with notmuch. If someone sends a message with a line that begins with “From “ in the <em>body</em> then it confuses notmuch. </p>

<p dir="auto">mu can correctly index these messages but my mu is linked against libgmime-2.6, my notmuch (0.28.3) is linked against libgmime-3.0.</p>

<blockquote style="border-left:2px solid #5855D5; color:#5855D5; margin:0 0 5px; padding-left:5px">
<blockquote style="border-left:2px solid #5855D5; color:#00AFCC; margin:0 0 5px; padding-left:5px; border-left-color:#00AFCC">
<p dir="auto">Is there a fix to force the recognition of maildir files in this case? I<br>
thought this was a solved problem with gmime since 2.6.7.</p>
</blockquote>

<p dir="auto">There is not currently a way to do that. It's not a GMime problem, it's<br>
a design choice of notmuch to avoid parsing multiple message<br>
mbox's. That was originally added as a safety feature, and I think it<br>
should probably stay the default. If someone wants work on adding a<br>
configuration switch I can point them in the right direction.</p>
</blockquote>

<p dir="auto">This is a poor design decision. It means anyone on the internet can break your mail setup simply by sending a message with a line starting with “From “.<br>
(and using usual quoted-printable Content-Transfer-Encoding).</p>

<p dir="auto">Try it. Send yourself a message with the line “From bad parsing comes chaos” and see if your notmuch can find it. My version can’t.</p>
</div>
</div>
</body>
</html>