From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8B279431FB6 for ; Fri, 9 Mar 2012 02:50:06 -0800 (PST) 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 j4snxUMJg2iD for ; Fri, 9 Mar 2012 02:50:05 -0800 (PST) Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66]) by olra.theworths.org (Postfix) with ESMTP id 5B8E5431FAE for ; Fri, 9 Mar 2012 02:50:05 -0800 (PST) Received: by guru.guru-group.fi (Postfix, from userid 501) id 3748168055; Fri, 9 Mar 2012 12:50:03 +0200 (EET) From: Tomi Ollila 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+288~g4b3af0e (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Fri, 09 Mar 2012 10:50:06 -0000 On Thu, 8 Mar 2012 17:48:15 -0400, David Bremner wrote: > From: David Bremner > > 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. At least for the time being I think we should apply http://en.wikipedia.org/wiki/Robustness_principle to this case and accept email files that start with 'From '... > This change reads the first 5 bytes of the file, and if they are "From ", > declares the file to be an mbox. an alternative to this is not to declare file as an mbox one but if first line starts with 'From ' skip that line. Whether this is a good idea or not I've already thought an implementation how to do this which I'll post as an RFC patch in next 12 hours. Tomi