From 9695d5074a89c52739e45071f9661e5420be0bc3 Mon Sep 17 00:00:00 2001 From: Perttu Luukko Date: Thu, 4 Sep 2014 07:34:35 +0300 Subject: [PATCH] Re: How to debug 'ignoring non-mail file' issues --- d8/d170cb07c1ffa06fb06dd2f3fb05344c3ea2d5 | 84 +++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 d8/d170cb07c1ffa06fb06dd2f3fb05344c3ea2d5 diff --git a/d8/d170cb07c1ffa06fb06dd2f3fb05344c3ea2d5 b/d8/d170cb07c1ffa06fb06dd2f3fb05344c3ea2d5 new file mode 100644 index 000000000..8eee20ac1 --- /dev/null +++ b/d8/d170cb07c1ffa06fb06dd2f3fb05344c3ea2d5 @@ -0,0 +1,84 @@ +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 0C9EE431FB6 + for ; Wed, 3 Sep 2014 21:35:08 -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 QGo4+8MS3KWn for ; + Wed, 3 Sep 2014 21:34:58 -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 840AF431FAF + for ; Wed, 3 Sep 2014 21:34:58 -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 1XPOky-0004mq-0H; Thu, 04 Sep 2014 07:34:48 +0300 +Date: Thu, 4 Sep 2014 07:34:35 +0300 +From: Perttu Luukko +To: Jani Nikula +Subject: Re: How to debug 'ignoring non-mail file' issues +Message-ID: <20140904043435.GA3987@rakuuna.dhcp.inet.fi> +References: <20140831074059.GA13399@rakuuna.dhcp.inet.fi> + <87tx4ssoux.fsf@maritornes.cs.unb.ca> + <20140901065220.GB3901@lakka.kapsi.fi> + <20140901071526.GA13634@lakka.kapsi.fi> <87r3ztvjwn.fsf@nikula.org> + <20140903045439.GA5022@rakuuna.dhcp.inet.fi> + <87oauwadyb.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87oauwadyb.fsf@nikula.org> +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 +Cc: notmuch@notmuchmail.org +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: Thu, 04 Sep 2014 04:35:08 -0000 + +On 2014-09-03 19:03:40, Jani Nikula wrote: +> On Wed, 03 Sep 2014, Perttu Luukko wrote: +> > What I mean that there would be a separate error for cases "Does not +> > resemble an email message at all", i.e., some control file your mail +> > server happens to store in the mailbox, and "Looks like mail but we +> > can't parse it", i.e., better find out why it can't be parsed to avoid +> > potentially important messages going missing from the database. +> +> As I said, GMime does not tell us the difference between the two. + +There could be a separate parsing step that reads the first kilobyte or +so and checks whether it is text, and whether there is a line starting +with "From: " and possibly other headers. This could be run if GMime +thinks the file is not mail so there would be negligible overhead. + +This is just a suggestion. Notmuch users are probably quite experienced +so they can always investigate on their own why their emails are being +ignored. But there could be more warning about ignored messages. +Something like, at the end of each 'notmuch new' output: "Note: some +files were ignored as non-mail. Check the list at +~/mail/.notmuch/ignored-files and adjust your ~/.notmuch-config". + +-- +Perttu -- 2.26.2