From 917f4598589afd356855d4b6ceaa7692db5caa25 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sat, 10 Mar 2012 16:45:35 +0200 Subject: [PATCH] Re: [PATCH] mime_node_open: skip envelope from lines at the start of messages --- 08/6dfaf3210b209c9f0805eabd28bea755d3cdd6 | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 08/6dfaf3210b209c9f0805eabd28bea755d3cdd6 diff --git a/08/6dfaf3210b209c9f0805eabd28bea755d3cdd6 b/08/6dfaf3210b209c9f0805eabd28bea755d3cdd6 new file mode 100644 index 000000000..46238b4a8 --- /dev/null +++ b/08/6dfaf3210b209c9f0805eabd28bea755d3cdd6 @@ -0,0 +1,96 @@ +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 CC8EB431FBC + for ; Sat, 10 Mar 2012 06:45:42 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.01 +X-Spam-Level: +X-Spam-Status: No, score=0.01 tagged_above=-999 required=5 + tests=[T_MIME_NO_TEXT=0.01] 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 mGSEPqIQCUVz for ; + Sat, 10 Mar 2012 06:45:41 -0800 (PST) +Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66]) + by olra.theworths.org (Postfix) with ESMTP id A584B431FAE + for ; Sat, 10 Mar 2012 06:45:41 -0800 (PST) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 5079F68055; Sat, 10 Mar 2012 16:45:39 +0200 (EET) +From: Tomi Ollila +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH] mime_node_open: skip envelope from lines at the start of + messages +In-Reply-To: <1331385931-1610-1-git-send-email-david@tethera.net> +References: <4F5A2DB1.7040301@fifthhorseman.net> + <1331385931-1610-1-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.11.1+288~g4b3af0e (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha1; protocol="application/pgp-signature" +Cc: David Bremner +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: Sat, 10 Mar 2012 14:45:43 -0000 + +--=-=-= +Content-Transfer-Encoding: quoted-printable + +On Sat, 10 Mar 2012 09:25:31 -0400, David Bremner wrote: +> From: David Bremner +>=20 +> Some MDAs such as procmail (in MH mode), and exim (doing local +> delivery in some configurations of the appendfile transport) add a +> line to the front of a message with "From " followed by envelope +> sender. Since this is not a proper RFC822 header field, gmime (at +> least since version 2.6) refuses to parse it, unless in mbox mode. +>=20 +> This change reads the line of the file, and if they start with +> "From ", pass the stream to gmime starting from the second line. +>=20 +> This makes mime_node_open more consistent with (but still stricter +> than) the permissive behaviour of notmuch_file_get_header +> (message-file.c), which allows a certain number of "broken_headers". +>=20 +> We avoid putting gmime into mbox mode in case of side effects; this +> leaves the situation of mboxes accidentally indexed by notmuch the +> same as before, namely "undefined behaviour". Ideally they should at +> least be warned by notmuch-new. Although strict rfc822 adherence +> would be one way to detect mboxes, it doesn't seem to fit with the +> spirit or code of message-file.c. +> --- +> This version fixes a few formatting issues, and one bug (the strncmp). + ++1 + +Tomi + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.5 (GNU/Linux) + +iD8DBQFPW2kToEBNrhe2D3URAl3cAJ9xLPGIjZG+zBHHeDyaNbF8qAw+4QCfQ3ui +5fdmpqYWIoX8IUpgZkulNqs= +=pl1k +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2