[PATCH 1/6] Sync schemata with current code structure
[notmuch-archives.git] / 09 / 95beb0e48df25e08da8c713fa0d242fff09c72
1 Return-Path: <tomi.ollila@iki.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 8B279431FB6\r
6         for <notmuch@notmuchmail.org>; Fri,  9 Mar 2012 02:50:06 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id j4snxUMJg2iD for <notmuch@notmuchmail.org>;\r
16         Fri,  9 Mar 2012 02:50:05 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
18         by olra.theworths.org (Postfix) with ESMTP id 5B8E5431FAE\r
19         for <notmuch@notmuchmail.org>; Fri,  9 Mar 2012 02:50:05 -0800 (PST)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 3748168055; Fri,  9 Mar 2012 12:50:03 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
24 Subject: Re: [PATCH] mime_node_open: check if the file is in mbox format,\r
25         and inform gmime.\r
26 In-Reply-To: <1331243295-27324-1-git-send-email-david@tethera.net>\r
27 References: <87vcme3kf6.fsf@pip.fifthhorseman.net>\r
28         <1331243295-27324-1-git-send-email-david@tethera.net>\r
29 User-Agent: Notmuch/0.11.1+288~g4b3af0e (http://notmuchmail.org) Emacs/23.3.1\r
30         (x86_64-unknown-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Fri, 09 Mar 2012 12:50:03 +0200\r
35 Message-ID: <m2aa3qjbfo.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=us-ascii\r
38 Cc: David Bremner <bremner@debian.org>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Fri, 09 Mar 2012 10:50:06 -0000\r
52 \r
53 On Thu,  8 Mar 2012 17:48:15 -0400, David Bremner <david@tethera.net> wrote:\r
54 > From: David Bremner <bremner@debian.org>\r
55\r
56 > It seems that it has always been an error to try to parse an mbox\r
57 > format file with gmime without calling g_mime_parser_set_scan_from.\r
58 \r
59 At least for the time being I think we should apply\r
60 http://en.wikipedia.org/wiki/Robustness_principle to this case\r
61 and accept email files that start with 'From '...\r
62 \r
63 > This change reads the first 5 bytes of the file, and if they are "From ",\r
64 > declares the file to be an mbox.\r
65 \r
66 an alternative to this is not to declare file as an mbox one but\r
67 if first line starts with 'From ' skip that line.\r
68 \r
69 Whether this is a good idea or not I've already thought an implementation\r
70 how to do this which I'll post as an RFC patch in next 12 hours.\r
71 \r
72 \r
73 Tomi\r