From c6f8aa5c128aecdbe0ac6e61cae297939b767050 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 14 Jul 2014 11:54:48 +2100 Subject: [PATCH] Re: [PATCH 2/2] Make parsing of References and In-Reply-To header less error prone --- c7/920e33e3bc478ce1d710af6b91fd36b3cc34dd | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 c7/920e33e3bc478ce1d710af6b91fd36b3cc34dd diff --git a/c7/920e33e3bc478ce1d710af6b91fd36b3cc34dd b/c7/920e33e3bc478ce1d710af6b91fd36b3cc34dd new file mode 100644 index 000000000..e1da5faf2 --- /dev/null +++ b/c7/920e33e3bc478ce1d710af6b91fd36b3cc34dd @@ -0,0 +1,71 @@ +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 67C26431FBD + for ; Sun, 13 Jul 2014 07:54:59 -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 9Nn0VvCmw2oP for ; + Sun, 13 Jul 2014 07:54:52 -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 48679431FBC + for ; Sun, 13 Jul 2014 07:54:52 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1X6LAx-0007Qj-IU; Sun, 13 Jul 2014 11:54:51 -0300 +Received: (nullmailer pid 3045 invoked by uid 1000); Sun, 13 Jul 2014 + 14:54:48 -0000 +From: David Bremner +To: Michal Sojka , notmuch@notmuchmail.org +Subject: Re: [PATCH 2/2] Make parsing of References and In-Reply-To header + less error prone +In-Reply-To: <1401113157-32454-3-git-send-email-sojkam1@fel.cvut.cz> +References: <1401113157-32454-1-git-send-email-sojkam1@fel.cvut.cz> + <1401113157-32454-3-git-send-email-sojkam1@fel.cvut.cz> +User-Agent: Notmuch/0.18.1+29~gb5327d4 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sun, 13 Jul 2014 11:54:48 -0300 +Message-ID: <8761j1fgw7.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +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, 13 Jul 2014 14:54:59 -0000 + +Michal Sojka writes: + +> According to RFC2822 References and In-Reply-To headers are supposed +> to contain one or more Message-IDs, however older RFC822 allowed +> almost any content. When both References and In-Reply-To headers ends +> with something else that a Message-ID (see e.g. [1]), the thread +> structure presented by notmuch is incorrect. The reason is that +> notmuch treats this case as if the email contained no "replyto" +> information (see _notmuch_database_link_message_to_parents). +> +> This patch changes the parse_references() function to return the last +> valid Message-ID encountered rather than NULL resulting from the last +> hunk of text not being the Message-ID. + +This series looks OK to me. It does touch something pretty fundamental, +so I'd appreciate a second set of eyes on it. + +d -- 2.26.2