From: Matthew Lear Date: Tue, 1 Mar 2016 21:09:16 +0000 (+0000) Subject: (emacs) Parsing problems replying to encrypted html X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=acf0f88e5246717abec040e03aa991a5c2e693d9;p=notmuch-archives.git (emacs) Parsing problems replying to encrypted html --- diff --git a/8c/8bbef10e842acd84e5a8e522cfd62ec519bc2f b/8c/8bbef10e842acd84e5a8e522cfd62ec519bc2f new file mode 100644 index 000000000..f7669038e --- /dev/null +++ b/8c/8bbef10e842acd84e5a8e522cfd62ec519bc2f @@ -0,0 +1,170 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id DCFE76DE103A + for ; Tue, 1 Mar 2016 05:16:59 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.386 +X-Spam-Level: +X-Spam-Status: No, score=-0.386 tagged_above=-999 required=5 tests=[AWL=0.334, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id mAexUNzAWBed for ; + Tue, 1 Mar 2016 05:16:57 -0800 (PST) +X-Greylist: delayed 457 seconds by postgrey-1.35 at arlo; + Tue, 01 Mar 2016 05:16:56 PST +Received: from avasout07.plus.net (avasout07.plus.net [84.93.230.235]) + by arlo.cworth.org (Postfix) with ESMTPS id E0DBA6DE00DF + for ; Tue, 1 Mar 2016 05:16:55 -0800 (PST) +Received: from webmail04.plus.net ([84.93.228.66]) by avasout07 with smtp + id Qd9G1s0021SbfYc01d9G6A; Tue, 01 Mar 2016 13:09:16 +0000 +X-CM-Score: 0.00 +X-CNFS-Analysis: v=2.1 cv=QqujpgGd c=1 sm=1 tr=0 + a=C5+YawzV8SR07mwocaP9vA==:117 a=G4bc5lkgapKKm1P+Twxy3Q==:17 + a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=8nJEP1OIZ-IA:10 + a=7OsogOcEt9IA:10 a=xLoQFyq0T0LXa8BorckA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 + a=wPNLvfGTeEIA:10 +Received: from localhost ([127.0.0.1] helo=webmail.plus.net) + by webmail04.plus.net with esmtp (Exim 4.76) + (envelope-from ) id 1aak3A-0008PB-4j + for notmuch@notmuchmail.org; Tue, 01 Mar 2016 13:09:16 +0000 +Received: from 80.229.236.194 (SquirrelMail authenticated user bubblegen+matt) + by webmail.plus.net with HTTP; Tue, 1 Mar 2016 13:09:16 -0000 +Message-ID: +Date: Tue, 1 Mar 2016 13:09:16 -0000 +Subject: (emacs) Parsing problems replying to encrypted html +From: "Matthew Lear" +To: notmuch@notmuchmail.org +Reply-To: matt@bubblegen.co.uk +User-Agent: SquirrelMail +MIME-Version: 1.0 +Content-Type: text/plain;charset=iso-8859-1 +Content-Transfer-Encoding: 8bit +X-Priority: 3 (Normal) +Importance: Normal +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Tue, 01 Mar 2016 13:17:00 -0000 + +Hi, +I've noticed a problem when replying to an encrypted email when I have +html set as preferred over plain text. Looks like notmuch fails to parse +the body and the original body text in notmuch-reply just looks like this: + +> [ text/html ] +> !!! Bodypart insert error: End of file during parsing !!! + +A few things which might help understand what could be happening here... + +notmuch from git with head @ 07b6220 +gmime 2.6.20-r1 (gentoo) + +(setq mm-text-html-renderer 'shr) +(setq shr-inhibit-images nil) +(setq mime-view-text/html-previewer 'shr) +(setq mm-inline-text-html-with-images t) + +(set-locale-environment "en_GB.UTF-8") +(set-language-environment 'utf-8) +(set-selection-coding-system 'utf-8) +(prefer-coding-system 'utf-8) +(set-default-coding-systems 'utf-8) +(set-terminal-coding-system 'utf-8) +(set-keyboard-coding-system 'utf-8) +(setq default-buffer-file-coding-system 'utf-8) + +(setq notmuch-multipart/alternative-discouraged '("text/plain" +"multipart/related")) + +The message I'm replying to looks like: + +User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 + Thunderbird/38.6.0 +MIME-Version: 1.0 +In-Reply-To: +Content-Type: multipart/encrypted; + protocol="application/pgp-encrypted"; + boundary="et6k1RmUSFFnhWFnwewqvineB8rlw3boE" + +This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) +--et6k1RmUSFFnhWFnwewqvineB8rlw3boE +Content-Type: application/pgp-encrypted +Content-Description: PGP/MIME version identification + +Version: 1 + +--et6k1RmUSFFnhWFnwewqvineB8rlw3boE +Content-Type: application/octet-stream; name="encrypted.asc" +Content-Description: OpenPGP encrypted message +Content-Disposition: inline; filename="encrypted.asc" + +-----BEGIN PGP MESSAGE----- +Version: GnuPG v2 + +hQEMA41hzuYEoCb4AQgApMvj7nt6Goj1kLDUheofRWwORI/CNFgExIIAAz8ivJxH +... +... +6nVgRBQIJp+59xsmfC2axrASSAh11/ZdVl3T60LvlrsoKLkBHNAC4W+H/cyxxDk0 +BnJC8+QJbgbyRBANUV4d5PCUbKcuDRW/TVQhtZY= +=rKjq +-----END PGP MESSAGE----- + +--et6k1RmUSFFnhWFnwewqvineB8rlw3boE-- + + +Notmuch shows this as: + +[ multipart/encrypted ] +[ Decryption successful ] +[ Good signature by: xxxx ] +[ application/pgp-encrypted ] +Version: 1 +[ multipart/mixed ] +[ multipart/alternative ] +[ text/plain (hidden) ] +[ multipart/related ] +[ text/html (hidden) ] +[ image.jpg: image/jpeg (hidden) ] + +Things of interest: + +1/ I have the same encrypted email in plain text only and replying to it +works fine with notmuch. + +2/ I can view the html from the email in a browser, and it looks fine. + +3/ If I switch emacs to use w3m instead of shr, I don't see the 'Bodypart +insert error' fro notmuch-reply but there is no original message included +in the reply composition either. + +I'm not quite sure if this is a notmuch issue as such, or attributed to my +emacs config, or something else... + +I don't know exactly what is supposed to happen when replying to html +emails, but if I reply to an html email which is not encrypted, there is +no '> [ text/html ]' in the reply composition window - it's just text from +the original message that I'm replying to and nothing more. + +Since the encrypted email I'm replying has a text part, can notmuch use +this and quote it when replying (obviously ensuring that the entire reply +will be encrypted). + +Any thoughts? + +Thanks a lot. +-- Matt +