From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs,gmane.emacs.gnus.general Subject: Re: 23.0.60; [gnus] incorrect Content-Transfer-Encoding for inline message/rfc822 entities Date: Thu, 24 Apr 2008 23:58:08 +0200 Message-ID: References: <87wsmojpej.fsf@gismo.pca.it> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1209074382 13918 80.91.229.12 (24 Apr 2008 21:59:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Apr 2008 21:59:42 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, rfrancoise@debian.org, ding@gnus.org To: Luca Capello Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 25 00:00:15 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jp9U9-00024S-MO for ged-emacs-devel@m.gmane.org; Fri, 25 Apr 2008 00:00:10 +0200 Original-Received: from localhost ([127.0.0.1]:32818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jp9TU-0003uu-DY for ged-emacs-devel@m.gmane.org; Thu, 24 Apr 2008 17:59:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jp9TQ-0003ui-9h for emacs-devel@gnu.org; Thu, 24 Apr 2008 17:59:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jp9TO-0003uM-FZ for emacs-devel@gnu.org; Thu, 24 Apr 2008 17:59:23 -0400 Original-Received: from [199.232.76.173] (port=39672 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jp9TO-0003uI-9G for emacs-devel@gnu.org; Thu, 24 Apr 2008 17:59:22 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jp9TN-0006PM-B9 for emacs-devel@gnu.org; Thu, 24 Apr 2008 17:59:21 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]:40677) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Jp9TM-0006TX-K1 for emacs-pretest-bug@gnu.org; Thu, 24 Apr 2008 17:59:20 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Jp9TI-0006OV-AZ for emacs-pretest-bug@gnu.org; Thu, 24 Apr 2008 17:59:20 -0400 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jp9TH-0006OF-Ns for emacs-pretest-bug@gnu.org; Thu, 24 Apr 2008 17:59:16 -0400 Original-Received: from localhost (corona.rz.uni-ulm.de [134.60.1.50]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id m3OLx9B1018244; Thu, 24 Apr 2008 23:59:09 +0200 (MEST) X-Face: #vK]N[`vqjuod*|)'[iD7/"3AB-ApT%fmN"LWAg@oS7OesGv~)n[OBTLM#I="J'Y^-7I I/ps7o_'IK@#-Rs{::DZ@O8yS|fexe,XslY[:dNWOb~>?mC-&i_c)say:"\IpA.5U.b]'NY; Pks{lb h.+#6%DpZuaK3dcHB`Av3zc:r!C%~s0&m, tWj]&}, qg.+0ww2gK%f!:GK|wMl.I!(voY*1"^li8"~B BNG)9LvPi?^DMR-GVDnZqhu*3Hi, +g=wFhI)BL6&u{EOVEHjVEVq~d?_}lMntWAc3(6?kftjc>_f>! g0wM(qPM$d5]^TT_Qyi&L?LGVG)SHN;Gk/,pkY9,~ Mail-Followup-To: Luca Capello , ding@gnus.org, emacs-pretest-bug@gnu.org, rfrancoise@debian.org In-Reply-To: <87wsmojpej.fsf@gismo.pca.it> (Luca Capello's message of "Wed, 23 Apr 2008 22:18:44 +0200") User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2.50 (gnu/linux) X-Virus-Scanned: by amavisd-new X-MIME-Autoconverted: from 8bit to quoted-printable by mail.uni-ulm.de id m3OLx9B1018244 X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:95918 gmane.emacs.pretest.bugs:22132 gmane.emacs.gnus.general:66870 Archived-At: On Wed, Apr 23 2008, Luca Capello wrote: > Today I forwarded the attached mail to the Debian development mailing > list [1], but the mail was rejected by Postfix with error: > > Diagnostic code: smtp;550 5.6.0 invalid message/* or multipart/* > encoding domain > > The problem seems to be in the headers of the "message/rfc822" entity: > > Content-Type: message/rfc822 > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > In fact, according to RFC2046, =A7 5.2.1, RFC822 Subtype [2], > "quoted-printable" is not a valid encoding: > > No encoding other than "7bit", "8bit", or "binary" is permitted for > the body of a "message/rfc822" entity. > > The error is in lisp/gnus/mm-encode.el:mm-safer-encoding, which returns > quoted-printable if the entity encoding is either 8bit or > quoted-printable. If I correctly read RFC2046 this is plainly wrong fo= r > the specific "message/rfc822" entity, as it should return 8bit instead, > and as well as for base64 (it should return binary). I tested the > following patch for "message/rfc822" and "text/plain" entities: I've installed it in the stable Gnus branch (v5-10). It will be synced to the trunk and to Emacs (trunk and Emacs_22 branch) later. The patch looks good to me. Thanks for your contribution. Does anyone see a problem with this it? > --- mm-encode.el.~1~ 2008-04-23 19:37:22.000000000 +0200 > +++ mm-encode.el 2008-04-23 20:00:32.000000000 +0200 > @@ -96,14 +96,15 @@ > "application/octet-stream" > (mailcap-extension-to-mime (match-string 0 file)))) > > -(defun mm-safer-encoding (encoding) > +(defun mm-safer-encoding (encoding &optional type) > "Return an encoding similar to ENCODING but safer than it." > (cond > ((eq encoding '7bit) '7bit) ;; 7bit is considered safe. > - ((memq encoding '(8bit quoted-printable)) 'quoted-printable) > + ((memq encoding '(8bit quoted-printable)) > + (if (string=3D type "message/rfc822") '8bit 'quoted-printable)) > ;; The remaining encodings are binary and base64 (and perhaps some > ;; non-standard ones), which are both turned into base64. > - (t 'base64))) > + (t (if (string=3D type "message/rfc822") 'binary 'base64)))) > > (defun mm-encode-content-transfer-encoding (encoding &optional type) > "Encode the current buffer with ENCODING for MIME type TYPE. > @@ -178,7 +179,7 @@ > (mm-qp-or-base64) > (cadr (car rules))))) > (if mm-use-ultra-safe-encoding > - (mm-safer-encoding encoding) > + (mm-safer-encoding encoding type) > encoding)))) > (pop rules))))) Bye, Reiner. --=20 ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/