Closed bremner closed 2 years ago
Mbox has to take precedence over MIME structure, I think.
There are some GMimeParser hooks that can warn about various things. Maybe a warning could be added for this case and that could be used by NotMuch to decide if something truly is an mbox or not.
Jeffrey Stedfast @.***> writes:
Mbox has to take precedence over MIME structure, I think.
There are some GMimeParser hooks that can warn about various things. Maybe a warning could be added for this case and that could be used by NotMuch to decide if something truly is an mbox or not.
That could potentially be useful. What would the warning detect? "^From " at the "top level" of mime structure? Is that well defined?
d
I had a "shower thought" this morning and just confirmed with foo.txt, which was that if you read the first line of the input file and it matches "From " for the first 5 characters, then it's probably an mbox - otherwise it's definitely not.
That might be the best way.
Jeffrey Stedfast @.***> writes:
I had a "shower thought" this morning and just confirmed with foo.txt, which was that if you read the first line of the input file and it matches "From " for the first 5 characters, then it's probably an mbox - otherwise it's definitely not.
That might be the best way.
Yes, that's a good thought, and roughly what we do already. Unfortunately notmuch is trying to distinguish between mboxes with 1 message and those with multiple messages, and the first line is not enough information for that.
d
The code that saved the message to an mbox file should have munged the From
to be >From
.
I don't think there's an easy way to get the GMimeParser to handle this :(
Transcribing id:87h79dnwok.fsf@tethera.net, which seems to have been caught in the list's spam filter.
foo.txt