unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* BUG: "notmuch insert" fails with "Delivery of non-mail file"
@ 2019-01-18 16:07 Alvaro Herrera
  2019-01-19 18:17 ` David Bremner
  2019-03-07  6:57 ` Leo L. Schwab
  0 siblings, 2 replies; 9+ messages in thread
From: Alvaro Herrera @ 2019-01-18 16:07 UTC (permalink / raw)
  To: notmuch

Hello

I've been using notmuch successfully for a couple of years now (mostly
via neomutt).  Thanks for developing it.

Not long ago I switched my mail setup to use notmuch insert via
mailfilter instead of good old procmail.  However, since then a number
of emails are reported by notmuch as "non-mail", and appear to not be
indexed.  (I use --keep, so they're still in my maildir).

In my read of the code ultimately comes from
g_mime_parser_construct_message rejecting the message.
I reported this to GMime, and they said that the problem is that notmuch
insert is using the mbox mode:
https://github.com/jstedfast/gmime/issues/58
(Sample email is attached there).

As far as I can tell, this is all coming from
_notmuch_message_file_parse() which sets the is_mbox flag when it sees
the "^From " line at the start of the file ... which kinda makes sense
in general terms, but for notmuch-insert I think that's the wrong thing
to do.  Maybe a solution is to pass a flag down from notmuch-insert.c's
add_file all the way down to _notmuch_message_file_parse telling it not
to treat the file as an mbox.

I *think* that not all of the messages that fail parsing contain an
email attachment, so maybe I'll come back with further issues later on.
This is the first one I debugged.

Thanks

-- 
Álvaro Herrera

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-08  0:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-18 16:07 BUG: "notmuch insert" fails with "Delivery of non-mail file" Alvaro Herrera
2019-01-19 18:17 ` David Bremner
2019-01-21 19:53   ` Alvaro Herrera
2019-02-01 19:33     ` David Bremner
2019-03-07  6:57 ` Leo L. Schwab
2019-03-07 21:05   ` David Bremner
2019-03-07 22:03     ` Alvaro Herrera
2019-03-07 22:34       ` David Bremner
2019-03-08  0:51         ` Alvaro Herrera

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).