--- /dev/null
+Return-Path: <david@tethera.net>\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 1BC1E431FBD\r
+ for <notmuch@notmuchmail.org>; Sun, 31 Aug 2014 07:42:01 -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 jiPaUOrH+Cpr for <notmuch@notmuchmail.org>;\r
+ Sun, 31 Aug 2014 07:41:53 -0700 (PDT)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 3E429431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 31 Aug 2014 07:41:53 -0700 (PDT)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1XO6KB-000145-Gj; Sun, 31 Aug 2014 11:41:47 -0300\r
+Received: (nullmailer pid 23702 invoked by uid 1000); Sun, 31 Aug 2014\r
+ 14:41:42 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Perttu Luukko <perttu.luukko@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: How to debug 'ignoring non-mail file' issues\r
+In-Reply-To: <20140831074059.GA13399@rakuuna.dhcp.inet.fi>\r
+References: <20140831074059.GA13399@rakuuna.dhcp.inet.fi>\r
+User-Agent: Notmuch/0.18.1+72~g028c560 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sun, 31 Aug 2014 07:41:42 -0700\r
+Message-ID: <87tx4ssoux.fsf@maritornes.cs.unb.ca>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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: Sun, 31 Aug 2014 14:42:01 -0000\r
+\r
+Perttu Luukko <perttu.luukko@iki.fi> writes:\r
+\r
+\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
+d\r