Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 85998 invoked from network); 18 Aug 2009 21:26:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Aug 2009 21:26:15 -0000 Received: (qmail 67165 invoked by uid 500); 18 Aug 2009 21:26:34 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 67132 invoked by uid 500); 18 Aug 2009 21:26:34 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 67122 invoked by uid 99); 18 Aug 2009 21:26:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 21:26:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robertburrelldonkin@gmail.com designates 209.85.218.217 as permitted sender) Received: from [209.85.218.217] (HELO mail-bw0-f217.google.com) (209.85.218.217) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 21:26:26 +0000 Received: by bwz17 with SMTP id 17so3117827bwz.21 for ; Tue, 18 Aug 2009 14:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=OrNViZPnW6QAxIY+7AedPQZRgymtSrQ7GONdNaMyMbw=; b=Z4C4Mn/O4ekqZwN4b7TcCX+epKxMxNoJf3KBwMRmDYBHq7aRCvUVPc+4/9s6fbtBVs mPC++ospi4qwHShIhYOfBBN8O+W69kRoJRfglPYIsQWyjd24t3TC7xOSYfbbsKPFI5NK U0gOXY/U0N06KoVsDM+DVHcXyZx+OMwZ+wuls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=CvREG4KPM9LxlKsP6DTnolhWqApjsu8JKtAKxwTTpS763xwQnIs5IoR1Dl+pzGpSDX 0QL0qbfCnxCwmxFgc5hsymRFNL99qUiOWMPUrN4GsJewJ1/oKZtVu+beUXAtXddxr7A2 noM7e5gkicqp9M3qOBDBoiDDDoyJ7CgWEEgFs= MIME-Version: 1.0 Received: by 10.204.38.79 with SMTP id a15mr4169851bke.145.1250630764807; Tue, 18 Aug 2009 14:26:04 -0700 (PDT) In-Reply-To: <4A8B125C.1070809@apache.org> References: <4A8B125C.1070809@apache.org> Date: Tue, 18 Aug 2009 22:26:04 +0100 Message-ID: Subject: Re: Soft line breaks in quoted printable decoding From: Robert Burrell Donkin To: mime4j-dev@james.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Aug 18, 2009 at 9:43 PM, Oleg Kalnichevski wrote: > Markus Wiederkehr wrote: >> >> On Tue, Aug 18, 2009 at 3:03 PM, Alejandro >> Valdez wrote: >>> >>> Hi list, I noticed that the class QuotedPrintableInputStream expects >>> that the input stream is encoded using CRLF as line terminator (in >>> particular, when dealing with quoted printable soft line breaks), but >>> I have found that some e-mails are encoded using LF as line >>> terminator. In such cases QuotedPrintableInputStream leaves in the >>> decoded output a =LF for each line with a soft line break. >>> >>> I tried to find what RFC specifies that a mime e-mail should uses CRLF >>> as line terminator, but I could not find it... >>> >>> I patched my QuotedPrintableInputStream class to identify =LF as a >>> soft line break, it works ok, but maybe I missing something. >> >> Lines have to be terminated with CRLF if a message is transmitted via >> SMTP (see RFC 5321 section 2.3.8.). >> >> As far as I know this only applies when the message is transferred. It >> does not apply to the message itself, e.g. when it is stored on disk. >> >> So QuotedPrintableInputStream should probably accept other line endings I >> guess. >> >> Other opinions? >> >> Markus > > > I think QuotedPrintableInputStream should be lenient about line breaks and > treat both CRLF and lone LF as valid line breaks. > > I am still planning to review (and possibly rewrite most of) > QuotedPrintableInputStream class in order to address MIME4J-103 [1]. I could > tackle the line break issue at the same time. I just do not know when I may > get around to doing that. cool are there any volunteers out there who might be able to find time to take this on (with oleg's help, of course ;-)? - robert