From b8fbc5fdcd164c8cdda8258cd88bfacd31599b79 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 28 Jun 2014 12:45:56 +2100 Subject: [PATCH] Re: Bug#749890: python3-notmuch: missing header in mbox message -> NullPointerError --- 61/21a117fb684730e55277dead485d61d8fe2ac1 | 104 ++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 61/21a117fb684730e55277dead485d61d8fe2ac1 diff --git a/61/21a117fb684730e55277dead485d61d8fe2ac1 b/61/21a117fb684730e55277dead485d61d8fe2ac1 new file mode 100644 index 000000000..bb6aea62f --- /dev/null +++ b/61/21a117fb684730e55277dead485d61d8fe2ac1 @@ -0,0 +1,104 @@ +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 B442A431FBD + for ; Fri, 27 Jun 2014 08:46:17 -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 V9vDRIqjFUN7 for ; + Fri, 27 Jun 2014 08:46:10 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 81BFA431FAE + for ; Fri, 27 Jun 2014 08:46:10 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1X0YLg-0001Eg-Ks; Fri, 27 Jun 2014 12:46:00 -0300 +Received: (nullmailer pid 28669 invoked by uid 1000); Fri, 27 Jun 2014 + 15:45:56 -0000 +From: David Bremner +To: Jakub Wilk , 749890@bugs.debian.org +Subject: Re: Bug#749890: python3-notmuch: missing header in mbox message -> + NullPointerError +In-Reply-To: <20140626213100.GA8930@jwilk.net> +References: <8738ewudra.fsf@zancas.localnet> + <20140623201918.GA7346@jwilk.net> <87ha37fjm3.fsf@zancas.localnet> + <20140626213100.GA8930@jwilk.net> +User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 27 Jun 2014 12:45:56 -0300 +Message-ID: <878uoifj9n.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +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: Fri, 27 Jun 2014 15:46:17 -0000 + +Jakub Wilk writes: + +> * David Bremner , 2014-06-26, 18:26: +>>>0.18.1~rc0-1 is much better, thanks! +>>> +>>>I still get NullPointerError for one of my messages, though. :-( The +>>>message is in the MBOXCL format (where message body size is indicated +>>>by the Content-Length field), and has lines starting with "From " in +>>>the message body. I've attached a new test case. +>> +>>That message (and at a guess other MBOXCL files) is ignored as a +>>non-mail file by 0.18.1 "notmuch new". +> +> Indeed. +> +>>Is this another case of files which where indexed with an older version +>>of notmuch causing problems with a newer version? +> +> Yes, that's why I meant. Sorry for not being clear. + +As a point of information, I bisected with the following test script: + +#!/usr/bin/env bash +test_description='"notmuch new" in several variations' +. ./test-lib.sh + +test_begin_subtest "Support single-message mbox with content length (deprecated)" +cat > "${MAIL_DIR}"/mbox_file2 <From jwilk Fri May 30 14:09:05 2014 +Subject: Hello world! +Content-Length: 12 +Lines: 1 + +>From world! + +EOF +output=$(NOTMUCH_NEW 2>&1) +test_expect_equal "$output" \ +"Added 1 new message to the database." + + +test_done + +The commit where the behaviour changed to reject MBOXCL files with +'From ' in the body was 610f0e09929. This was between 0.14 and 0.15. +I'd say this was unintentional, although it isn't clear to me yet how +easy it is fix. + + -- 2.26.2