Re: notmuch ignoring alot of emails

2019-11-19 Thread David Bremner
Eirik Byrkjeflot Anonsen writes: > Then I can really only see three alternatives: > > 1. Ignore any "From " lines that aren't followed by something that looks >like it could reasonably be a mail header (as Tomi suggested). My >suspicion is that this would eliminate almost all false

Re: notmuch ignoring alot of emails

2019-11-17 Thread David Bremner
David Bremner writes: > Eirik Byrkjeflot Anonsen writes: > >> >> Or, notmuch could just look at the first line of the file. If it starts >> with "From ", it is an mbox. If it starts with a reasonable mail header, >> it is not an mbox. If it is neither, fall back to the old heuristics. >> > >

Re: notmuch ignoring alot of emails

2019-11-17 Thread David Bremner
Eirik Byrkjeflot Anonsen writes: > > Or, notmuch could just look at the first line of the file. If it starts > with "From ", it is an mbox. If it starts with a reasonable mail header, > it is not an mbox. If it is neither, fall back to the old heuristics. > FTR, this is what happens now

Re: notmuch ignoring alot of emails

2019-11-16 Thread David Bremner
Alvaro Herrera writes: > On 2019-Jun-30, Tomi Ollila wrote: > >> Just checking line starting with 'From ' would be pretty naïve since >> From may be first word in any line in text body. > > Even so, early mail systems relied on there not being any such lines, > and they escaped those lines to be

Re: notmuch ignoring alot of emails

2019-07-01 Thread Alvaro Herrera
On 2019-Jun-30, Tomi Ollila wrote: > Just checking line starting with 'From ' would be pretty naïve since > From may be first word in any line in text body. Even so, early mail systems relied on there not being any such lines, and they escaped those lines to be ">From" or to use quoted-printable

Re: notmuch ignoring alot of emails

2019-07-01 Thread Alvaro Herrera
On 2019-Jun-29, David Bremner wrote: > David Bremner writes: > > > Alvaro Herrera 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

Re: notmuch ignoring alot of emails

2019-06-30 Thread Tomi Ollila
On Fri, Jun 28 2019, Alvaro Herrera wrote: > On 2019-Jun-28, Alvaro Herrera wrote: > >> I think a real solution is to parse the message header, look for the >> Content-Length, and determine mbox-ness by looking for "From" only past >> that many bytes; that seems to match what other mail parsing

Re: notmuch ignoring alot of emails

2019-06-29 Thread David Bremner
David Bremner writes: > Alvaro Herrera writes: > >> On 2019-Jun-28, Alvaro Herrera wrote: >> >>> I think a real solution is to parse the message header, look for the >>> Content-Length, and determine mbox-ness by looking for "From" only past >>> that many bytes; that seems to match what other

Re: notmuch ignoring alot of emails

2019-06-29 Thread David Bremner
Alvaro Herrera writes: > On 2019-Jun-28, Alvaro Herrera wrote: > >> I think a real solution is to parse the message header, look for the >> Content-Length, and determine mbox-ness by looking for "From" only past >> that many bytes; that seems to match what other mail parsing tools do. > > Sorry,

Re: notmuch ignoring alot of emails

2019-06-28 Thread Alvaro Herrera
On 2019-Jun-28, Alvaro Herrera wrote: > I think a real solution is to parse the message header, look for the > Content-Length, and determine mbox-ness by looking for "From" only past > that many bytes; that seems to match what other mail parsing tools do. Sorry, I misspoke: there's no such thing

Re: notmuch ignoring alot of emails

2019-06-28 Thread Alvaro Herrera
On 2019-Mar-23, Alexei Gilchrist wrote: > When I run notmuch I get a bunch (hundreds) of emails that are ignored with: > > Note: Ignoring non-mail file: ... > > The files are valid maildir files but have a paragraph somewhere in the body > where someone has written "From ". Yeah, that happens

Re: notmuch ignoring alot of emails

2019-04-01 Thread Alexei Gilchrist
That’s interesting. Do you know a link to the file spec for maildir file content? All I can find is information about the directory structure and file naming, not the file content. mbsync which specialises in maildir also had an initial “From “ line for me, and they are independently

Re: notmuch ignoring alot of emails

2019-03-31 Thread David Bremner
"Alexei Gilchrist" writes: > That’s interesting. Do you know a link to the file spec for maildir > file content? All I can find is information about the directory > structure and file naming, not the file content. As far as I know, this is specified by RFC 5322. > mbsync which specialises

Re: notmuch ignoring alot of emails

2019-03-31 Thread Tomas Nordin
Alexei Gilchrist writes: > Every message file begins with “From “. This is true of all messages > downloaded by both offlineimap (with type = Maildir) and mbsync. > neomutt has no issues dealing with these files as maildir and mu has no > issues indexing them either. I’m assuming that stating

Re: notmuch ignoring alot of emails

2019-03-31 Thread Tomi Ollila
On Sun, Mar 31 2019, Alexei Gilchrist wrote: >>> When I run notmuch I get a bunch (hundreds) of emails that are >>> ignored >>> with: >>> >>> Note: Ignoring non-mail file: ... >>> >>> The files are valid maildir files but have a paragraph somewhere in >>> the >>> body where someone has written

Re: notmuch ignoring alot of emails

2019-03-31 Thread Alexei Gilchrist
When I run notmuch I get a bunch (hundreds) of emails that are ignored with: Note: Ignoring non-mail file: ... The files are valid maildir files but have a paragraph somewhere in the body where someone has written "From ". And do they also have have a line starting with "From " as the

Re: notmuch ignoring alot of emails

2019-03-30 Thread David Bremner
"Alexei Gilchrist" writes: > > 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. It's not that simple. My MDA is configured not to add the initial mbox "From " line to files in maildirs. d

Re: notmuch ignoring alot of emails

2019-03-30 Thread David Bremner
"Alexei Gilchrist" writes: > Hi > > When I run notmuch I get a bunch (hundreds) of emails that are ignored > with: > > Note: Ignoring non-mail file: ... > > The files are valid maildir files but have a paragraph somewhere in the > body where someone has written "From ". > And do they also