From dd8f5ec89e26828c239a4e0dcac8232b7f0e30f3 Mon Sep 17 00:00:00 2001 From: Perttu Luukko Date: Sun, 31 Aug 2014 10:40:59 +0300 Subject: [PATCH] How to debug 'ignoring non-mail file' issues --- 2e/d8e60e1bdae9addaa32af9faaa2e36d48a940a | 90 +++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 2e/d8e60e1bdae9addaa32af9faaa2e36d48a940a diff --git a/2e/d8e60e1bdae9addaa32af9faaa2e36d48a940a b/2e/d8e60e1bdae9addaa32af9faaa2e36d48a940a new file mode 100644 index 000000000..c86c90cf5 --- /dev/null +++ b/2e/d8e60e1bdae9addaa32af9faaa2e36d48a940a @@ -0,0 +1,90 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 2E131431FBD + for ; Sun, 31 Aug 2014 00:41:20 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id SgODyZheZYV4 for ; + Sun, 31 Aug 2014 00:41:15 -0700 (PDT) +Received: from mail.kapsi.fi (mail.kapsi.fi [217.30.184.167]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 6D074431FB6 + for ; Sun, 31 Aug 2014 00:41:15 -0700 (PDT) +Received: from dsl-jklbrasgw1-54fb12-136.dhcp.inet.fi ([84.251.18.136] + helo=localhost) + by mail.kapsi.fi with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) + (Exim 4.72) (envelope-from ) + id 1XNzl1-0001m9-4R + for notmuch@notmuchmail.org; Sun, 31 Aug 2014 10:41:03 +0300 +Date: Sun, 31 Aug 2014 10:40:59 +0300 +From: Perttu Luukko +To: notmuch@notmuchmail.org +Subject: How to debug 'ignoring non-mail file' issues +Message-ID: <20140831074059.GA13399@rakuuna.dhcp.inet.fi> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +User-Agent: Mutt/1.5.22.1 (2013-10-16) +X-SA-Exim-Connect-IP: 84.251.18.136 +X-SA-Exim-Mail-From: perttu.luukko@iki.fi +X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Sun, 31 Aug 2014 07:41:20 -0000 + +Hi, + +I indexed my archive of emails from recent years with notmuch (about 10k +messages so not much). I have quite a lot of messages 'notmuch new' +ignores as non-mail files, about 1000 of them. They are not obviously +malformed, meaning that the files certainly look like emails when opened +in a text editor. I'd like to find out why these files are ignored, and +if there is something I can do to fix them. Of course I'd like to have a +complete database of my old emails, with nothing falling through the +cracks like this. + +The vast majority of these ignored mails are not ignored after I +transfer them with offlineimap to another computer. I can non-ignore +these files probably by copying the renamed file back to the mail +server, so this is fixable. Offlineimap shouldn't mess with the file's +contents, so is there something that can cause notmuch to ignore a file +based on its name? + +Looking at the rest of the ignored messages most of them seem to have +very large attachments, but there are possibly others. There is only +maybe 20 of these kinds of emails so I can try to fix them manually. +Still, it would help if I knew what exactly caused notmuch to ignore the +file. I understand most of the message parsing is done with gmime. Does +gmime give any diagnostics on parse errors that could be used to give a +reason for thinking a file is not mail? + +I understand that the list of non-mail files is stored in the notmuch +database and the files are completely ignored from there on. This +actually makes it harder to debug these kind of issues since the list of +ignored mails is only visible on the first invocation of 'notmuch new', +unless the files are moved around. Is there some way to extract the list +of ignored files from the database for inspection? Maybe 'notmuch new' +could have some kind of --unignore-non-mail switch that would reconsider +previously ignored files. + +-- +Perttu Luukko -- 2.26.2