Re: exim pipe transport, notmuch insert and mbox-style messages
[notmuch-archives.git] / 02 / f813aa37b62f1682e07404f6b28d94f6435b22
1 Return-Path: <jani@nikula.org>\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 1B94E431FAF\r
6         for <notmuch@notmuchmail.org>; Fri, 26 Jul 2013 03:16:38 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 p-HSk9R8iZ0o for <notmuch@notmuchmail.org>;\r
16         Fri, 26 Jul 2013 03:16:30 -0700 (PDT)\r
17 Received: from mail-we0-f170.google.com (mail-we0-f170.google.com\r
18         [74.125.82.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 9D6B9431FAE\r
21         for <notmuch@notmuchmail.org>; Fri, 26 Jul 2013 03:16:30 -0700 (PDT)\r
22 Received: by mail-we0-f170.google.com with SMTP id w60so1708236wes.29\r
23         for <notmuch@notmuchmail.org>; Fri, 26 Jul 2013 03:16:28 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=google.com; s=20120113;\r
26         h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
27         :mime-version:content-type:x-gm-message-state;\r
28         bh=CLwDSrMRVNzv0didh7VStheMYFLoQtswHRk+bC5WZVc=;\r
29         b=CAC60za2kOcTGaAEIkiBRr8d2KN6z1hXJrLxQW5DEL1LnydJhth/SS6Fjjt6RO/8ec\r
30         Rj521i6PRvxs3MeKOFFMkMGbhCPsxyaxu+r6GE0NvzsDljjXinJtUHbUqdpjmCbWUQDF\r
31         WsZhc8wokuw7sGcCuW9xp0UBYDVtYtSRPou0LKniOFD256B3O4mkFYmbm27/kKrOJ8ja\r
32         orVzU56R+gU5VaYeUriaUgeXFv2SxZV0ZmZDOmYSHbg1mEAmG5Df8WlwBk5xjd5hD9Us\r
33         2gKp+/XlP0jLKaE059+SO3FtnhzBHDk9DDoU++Ad39P9MHy6644hJ6SmsP6olbXOQDL/\r
34         /bsQ==\r
35 X-Received: by 10.180.38.45 with SMTP id d13mr5117651wik.62.1374833786960;\r
36         Fri, 26 Jul 2013 03:16:26 -0700 (PDT)\r
37 Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
38         by mx.google.com with ESMTPSA id u9sm3616142wif.6.2013.07.26.03.16.24\r
39         for <multiple recipients>\r
40         (version=TLSv1.1 cipher=RC4-SHA bits=128/128);\r
41         Fri, 26 Jul 2013 03:16:25 -0700 (PDT)\r
42 From: Jani Nikula <jani@nikula.org>\r
43 To: David Bremner <david@tethera.net>,\r
44  Franz Fellner <alpine.art.de@gmail.com>,       notmuch@notmuchmail.org\r
45 Subject: Re: UTF-8 in mail headers (namely FROM) sent by bugzilla\r
46 In-Reply-To: <87y58xv71x.fsf@zancas.localnet>\r
47 References: <08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com>\r
48         <871u6psjwr.fsf@ericabrahamsen.net>\r
49         <5712cc41-d0ce-4ed3-af1c-37cf639dd9c0@gmail.com>\r
50         <87y58xv71x.fsf@zancas.localnet>\r
51 User-Agent: Notmuch/0.15.2+177~gb1ba76c (http://notmuchmail.org) Emacs/23.2.1\r
52         (x86_64-pc-linux-gnu)\r
53 Date: Fri, 26 Jul 2013 12:16:21 +0200\r
54 Message-ID: <87d2q5wrre.fsf@nikula.org>\r
55 MIME-Version: 1.0\r
56 Content-Type: text/plain; charset=us-ascii\r
57 X-Gm-Message-State:\r
58  ALoCoQko29M9Ro43HU2VDrllEyIxRDIGbadpeKM5xJcRvqsopQ3n5ZvT06DzGXNoFV+oWOldg6V2\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.13\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63         <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Fri, 26 Jul 2013 10:16:38 -0000\r
72 \r
73 On Tue, 23 Jul 2013, David Bremner <david@tethera.net> wrote:\r
74 > Franz Fellner <alpine.art.de@gmail.com> writes:\r
75 >\r
76 >>\r
77 >> OK, thx. So every app needs to get patched to display those strings\r
78 >> properly? Any chance this could be done directly in libnotmuch?  I\r
79 >> grepped for "2047" inside te "emacs" subtree, but found nothing (had\r
80 >> the hope for a comment for the workaround). Would be interesting to\r
81 >> see how this is done, so I can at least try to create a patch (though\r
82 >> my ruby is quite basic).\r
83 >\r
84 > In general notmuch relies on libgmime for rfc2047 parsing.  I'm not sure\r
85 > of all the details now, but some of the filtering does happen in the\r
86 > CLI, not the lib.  You could start by looking at\r
87 > gmime-filter-headers.[ch] in the top directory.\r
88 \r
89 I'm experiencing a similar problem with the Subject: headers in bugzilla\r
90 mail. Per RFC 2047,\r
91 \r
92     Ordinary ASCII text and 'encoded-word's may appear together in the\r
93     same header field.  However, an 'encoded-word' that appears in a\r
94     header field defined as '*text' MUST be separated from any adjacent\r
95     'encoded-word' or 'text' by 'linear-white-space'.\r
96 \r
97 In the problematic mails, the encoded-word begins immediately after\r
98 preceding text, i.e. without linear-white-space. Manually adding that\r
99 space in the message file makes the subject display as expected.\r
100 \r
101 The decoding is done in the cli using g_mime_message_get_subject(). I'm\r
102 not sure if there's much that can be done about it within notmuch.\r
103 \r
104 BR,\r
105 Jani.\r