Re: [PATCH] mime_node_open: skip envelope from lines at the start of messages
authorTomi Ollila <tomi.ollila@iki.fi>
Sat, 10 Mar 2012 14:45:35 +0000 (16:45 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:23 +0000 (09:45 -0800)
08/6dfaf3210b209c9f0805eabd28bea755d3cdd6 [new file with mode: 0644]

diff --git a/08/6dfaf3210b209c9f0805eabd28bea755d3cdd6 b/08/6dfaf3210b209c9f0805eabd28bea755d3cdd6
new file mode 100644 (file)
index 0000000..46238b4
--- /dev/null
@@ -0,0 +1,96 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CC8EB431FBC\r
+       for <notmuch@notmuchmail.org>; Sat, 10 Mar 2012 06:45:42 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.01\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
+       tests=[T_MIME_NO_TEXT=0.01] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id mGSEPqIQCUVz for <notmuch@notmuchmail.org>;\r
+       Sat, 10 Mar 2012 06:45:41 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
+       by olra.theworths.org (Postfix) with ESMTP id A584B431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 10 Mar 2012 06:45:41 -0800 (PST)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id 5079F68055; Sat, 10 Mar 2012 16:45:39 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] mime_node_open: skip envelope from lines at the start of\r
+       messages\r
+In-Reply-To: <1331385931-1610-1-git-send-email-david@tethera.net>\r
+References: <4F5A2DB1.7040301@fifthhorseman.net>\r
+       <1331385931-1610-1-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.11.1+288~g4b3af0e (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sat, 10 Mar 2012 16:45:35 +0200\r
+Message-ID: <m24ntwecq8.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+Cc: David Bremner <bremner@debian.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 10 Mar 2012 14:45:43 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Sat, 10 Mar 2012 09:25:31 -0400, David Bremner <david@tethera.net> wrote:\r
+> From: David Bremner <bremner@debian.org>\r
+>=20\r
+> Some MDAs such as procmail (in MH mode), and exim (doing local\r
+> delivery in some configurations of the appendfile transport) add a\r
+> line to the front of a message with "From " followed by envelope\r
+> sender.  Since this is not a proper RFC822 header field, gmime (at\r
+> least since version 2.6) refuses to parse it, unless in mbox mode.\r
+>=20\r
+> This change reads the line of the file, and if they start with\r
+> "From ", pass the stream to gmime starting from the second line.\r
+>=20\r
+> This makes mime_node_open more consistent with (but still stricter\r
+> than) the permissive behaviour of notmuch_file_get_header\r
+> (message-file.c), which allows a certain number of "broken_headers".\r
+>=20\r
+> We avoid putting gmime into mbox mode in case of side effects; this\r
+> leaves the situation of mboxes accidentally indexed by notmuch the\r
+> same as before, namely "undefined behaviour".  Ideally they should at\r
+> least be warned by notmuch-new.  Although strict rfc822 adherence\r
+> would be one way to detect mboxes, it doesn't seem to fit with the\r
+> spirit or code of message-file.c.\r
+> ---\r
+> This version fixes a few formatting issues, and one bug (the strncmp).\r
+\r
++1\r
+\r
+Tomi\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.5 (GNU/Linux)\r
+\r
+iD8DBQFPW2kToEBNrhe2D3URAl3cAJ9xLPGIjZG+zBHHeDyaNbF8qAw+4QCfQ3ui\r
+5fdmpqYWIoX8IUpgZkulNqs=\r
+=pl1k\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r