--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 56853431FC4\r
+ for <notmuch@notmuchmail.org>; Mon, 1 Sep 2014 00:48:58 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id DdGkjz27equJ for <notmuch@notmuchmail.org>;\r
+ Mon, 1 Sep 2014 00:48:47 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 9E89E431FAE\r
+ for <notmuch@notmuchmail.org>; Mon, 1 Sep 2014 00:48:47 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 0BE14100090;\r
+ Mon, 1 Sep 2014 10:48:31 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Perttu Luukko <perttu.luukko@iki.fi>, David Bremner <david@tethera.net>\r
+Subject: Re: How to debug 'ignoring non-mail file' issues\r
+In-Reply-To: <20140901065220.GB3901@lakka.kapsi.fi>\r
+References: <20140831074059.GA13399@rakuuna.dhcp.inet.fi>\r
+ <87tx4ssoux.fsf@maritornes.cs.unb.ca>\r
+ <20140901065220.GB3901@lakka.kapsi.fi>\r
+User-Agent: Notmuch/0.18.1+76~g581776d (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Mon, 01 Sep 2014 10:48:30 +0300\r
+Message-ID: <m28um3g4s1.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 01 Sep 2014 07:48:58 -0000\r
+\r
+On Mon, Sep 01 2014, Perttu Luukko <perttu.luukko@iki.fi> wrote:\r
+\r
+> On 2014-08-31 07:41:42, David Bremner wrote:\r
+>> Perttu Luukko <perttu.luukko@iki.fi> writes:\r
+>> > The vast majority of these ignored mails are not ignored after I\r
+>> > transfer them with offlineimap to another computer. I can non-ignore\r
+>> > these files probably by copying the renamed file back to the mail\r
+>> > server, so this is fixable. Offlineimap shouldn't mess with the file's\r
+>> > contents, so is there something that can cause notmuch to ignore a file\r
+>> > based on its name?\r
+>> \r
+>> The most likely cause is that the files are mboxes, whether intentional\r
+>> or not. In particular if they start with a "From " (note the lack of :)\r
+>> and contain a second "From " at the beginning of a line later in the\r
+>> file. In this case something like sed can replace the initial \r
+>> "From " with "X-Envelope-From: ".\r
+>> \r
+>> I agree that the error message could be more informative in this case.\r
+>\r
+> No, the mails do contain "From: " with the appropriate colon. If I\r
+> understood correctly notmuch returns the same "not mail" return code\r
+\r
+The question here is whether the very first line of the mail file begins\r
+with 'From ', not whether *any* of the actual header line starts with 'From: '\r
+IIRC the mails get accepted even the 'From:' header were missing...\r
+\r
+> both when the essential headers are missing (so the file probably really\r
+> isn't mail) and when GMime fails to parse the message. I think it would\r
+> be a good idea to give a different warning in the latter case.\r
+\r
+Sure... :D\r
+\r
+>\r
+> If the files really are ignored because of GMime it also explains why so\r
+> much more files are ignored on my mail provider's server than on my\r
+> laptop. The server probably has an older version of GMime. I'll upgrade\r
+> and see if that makes a difference.\r
+>\r
+> -- \r
+> Perttu\r
+\r
+\r
+Tomi\r