From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 9A90F6DE0924 for ; Fri, 18 Jan 2019 08:14:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -2.8 X-Spam-Level: X-Spam-Status: No, score=-2.8 tagged_above=-999 required=5 tests=[AWL=-2.099, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7PgqeVpHi07z for ; Fri, 18 Jan 2019 08:14:24 -0800 (PST) X-Greylist: delayed 401 seconds by postgrey-1.36 at arlo; Fri, 18 Jan 2019 08:14:24 PST Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by arlo.cworth.org (Postfix) with ESMTPS id 06BD06DE018B for ; Fri, 18 Jan 2019 08:14:23 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id ABF7F1F12 for ; Fri, 18 Jan 2019 11:07:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 18 Jan 2019 11:07:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=uW5dfN rtvdSPKj9zNSKfdElG8AvEemP7BQB1dS5dyW8=; b=vCOz1OktaklZld/hjDe9OS rNJoxcVjzaT+/h782B3nvfUug1YYrn8tKodidywHNXmV3WWCk6KlIS252vlGkk/q 3GedllczLSvRS5OpfDdUofKvwnoP523BrUUR9V2SxXuH4npAWQJ2A5nZZPljou+q B5NYkhmAU+l15yTAFDk7o0w85Xgs7LJk0p6wrYMfO14D2qGOBKLp8c+xePaKKWrw TTdxxuSxdbpHtuajCFzdGcKiNpaPR6yQn1KlTx95q2MTiqb1sOg0q5+D5LF5dq32 mLJl/ZQ+kj1RFzmHmg9622fDEqbGPXanayXd0Q5MFMwC+OwjhZL7cUfaz8ek16jg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrhedtgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucenucfjughrpeffhffvuffkgggtugfgfgesthekredttderudenucfhrhhomhepte hlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdr ohhrgheqnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepudeltddruddvud drvdelrdefnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhh rdhnohdqihhprdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from alvin.alvh.no-ip.org (unknown [190.121.29.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 87C56E425A for ; Fri, 18 Jan 2019 11:07:38 -0500 (EST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id A7495978; Fri, 18 Jan 2019 13:07:35 -0300 (-03) Date: Fri, 18 Jan 2019 13:07:35 -0300 From: Alvaro Herrera To: notmuch@notmuchmail.org Subject: BUG: "notmuch insert" fails with "Delivery of non-mail file" Message-ID: <201901181607.4rba4c5uyimv@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: NeoMutt/20180716-1013-2c1e88 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 16:14:24 -0000 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