From fce7035dbc4e99c3875091c4666f0aa501851fb4 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Fri, 9 Mar 2012 14:05:40 +1600 Subject: [PATCH] Re: [PATCH] mime_node_open: check if the file is in mbox format, and inform gmime. --- 83/1b4b972c662fe0c50eb1b8166dc09edbb09dc9 | 109 ++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 83/1b4b972c662fe0c50eb1b8166dc09edbb09dc9 diff --git a/83/1b4b972c662fe0c50eb1b8166dc09edbb09dc9 b/83/1b4b972c662fe0c50eb1b8166dc09edbb09dc9 new file mode 100644 index 000000000..ce01009d2 --- /dev/null +++ b/83/1b4b972c662fe0c50eb1b8166dc09edbb09dc9 @@ -0,0 +1,109 @@ +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 5F338431FB6 + for ; Thu, 8 Mar 2012 14:05:47 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.29 +X-Spam-Level: +X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3, 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 28Ly3CMmM71D for ; + Thu, 8 Mar 2012 14:05:46 -0800 (PST) +Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu + [131.215.239.19]) + by olra.theworths.org (Postfix) with ESMTP id C90CC431FAE + for ; Thu, 8 Mar 2012 14:05:46 -0800 (PST) +Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by fire-doxen-postvirus (Postfix) with ESMTP id 564413280B3; + Thu, 8 Mar 2012 14:05:46 -0800 (PST) +X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new +Received: from finestructure.net (DHCP-123-180.caltech.edu [131.215.123.180]) + (Authenticated sender: jrollins) + by fire-doxen-submit (Postfix) with ESMTP id 9540B2E50D70; + Thu, 8 Mar 2012 14:05:42 -0800 (PST) +Received: by finestructure.net (Postfix, from userid 1000) + id 7634E9DE; Thu, 8 Mar 2012 14:05:42 -0800 (PST) +From: Jameson Graef Rollins +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH] mime_node_open: check if the file is in mbox format, + and inform gmime. +In-Reply-To: <1331243295-27324-1-git-send-email-david@tethera.net> +References: <87vcme3kf6.fsf@pip.fifthhorseman.net> + <1331243295-27324-1-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.11.1+266~gadb05cc (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Thu, 08 Mar 2012 14:05:40 -0800 +Message-ID: <87sjhiaguj.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha256; 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: Thu, 08 Mar 2012 22:05:47 -0000 + +--=-=-= +Content-Transfer-Encoding: quoted-printable + +On Thu, 8 Mar 2012 17:48:15 -0400, David Bremner wrote: +> From: David Bremner +>=20 +> It seems that it has always been an error to try to parse an mbox +> format file with gmime without calling g_mime_parser_set_scan_from. +>=20 +> This change reads the first 5 bytes of the file, and if they are "From ", +> declares the file to be an mbox. +> --- +>=20 +> This patch seems to fix the problem for me. I don't think the +> performance impact should be too bad, but I didn't really test it. + +As I've stated previously in this thread, I think this behavior is a +mistake. This will not result in a proper parsing of an mbox file, and +improper or incomplete parsing of mbox files will lead to bad/confusing +behavior. + +We should either completely support mbox files or not support them. +Partial support is, imho, a recipe for disaster. We don't currently +support them, and it would take a lot of extra work to do so completely. +I don't see any harm in just telling users to convert their mbox files +into proper message files. + +jamie. + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iQIcBAEBCAAGBQJPWS00AAoJEO00zqvie6q8RXQQALFfsAfosiC6gJkJ1ttN9dPw +jGFi7pMPx8iKKBv2L4qvMnsKUc7hyODG7aVvRSKtYkmHN6hvpVqZQkKeaJrg6QL2 +Nv+2MPhcD8UF4wTmU9gK3NEppmELgJJk4Uu0CkFkpSWUu9c3pfZFoJpOBncIp7Ka +skBQd3qr+FayH+cXHfAYekO+nqtFkd6RhOyU4cQSX6FH74a+4/DbV3A5WS5F5Zq/ +USdS8L5TKs+TD9zp4w8reHmRDLxiEjNe91lOrPyxQ+3E4KIqEZP6Tr2VMP5coKW0 +ZJUIAgRgAr+LAtBC/d4LRh5IkIM/dpLGWPDmyWI8NEOpuBcjIhHDZLcOgjwnQfVY +uV/wq+T4XsyHhNJYEbVF6DSsaKK1m07NFpSPkUu15sB3zwgQ4pYmVIQ7pG9gVL1f +2urmepAn6q+hNwK+/qUExCwcwowVuxRvWUoghzzOhfmyBOTnmruNqnSgkAu7cTtT +3ruq+XkP0UyorA6rrQFbT107eWF/B1hHT0IYQti+3/cWuN9IvSOMdrl2/SiUXtDM +FQcKuNJiUC8PNHIVRDZrA/9e2AJ25u9I6ixr+FO/K/oN/l82A/zrUk8MuUIe72hQ +1stVgmLiTsc7Xd9uS5eGKzgiljrTmCx1QVos47kK/u6oWJDgBgWLZOcy+Z7BP3lA +p6gSjFECXiw0Vo5d+cmm +=Nu1y +-----END PGP SIGNATURE----- +--=-=-=-- -- 2.26.2