Skip Menu |

This queue is for tickets about the MIME-Lite CPAN distribution.

Report information
The Basics
Id: 63253
Status: open
Priority: 0/
Queue: MIME-Lite

People
Owner: Nobody in particular
Requestors: pavel2000 [...] ngs.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Please remove unwanted \n
Date: Tue, 23 Nov 2010 07:18:08 +0600
To: bug-MIME-Lite [...] rt.cpan.org
From: "Pavel V." <pavel2000 [...] ngs.ru>
--- Lite.pm.orig 2010-11-23 06:45:34.000000000 +0600 +++ Lite.pm 2010-11-23 06:38:20.000000000 +0600 @@ -2179,7 +2179,7 @@ } ### Epilogue: - $out->print("\n--$boundary--\n\n"); + $out->print("\n--$boundary--\n"); } elsif ( $type =~ m{^message/} ) { my @parts = @{ $self->{Parts} }; I have mail with following structure: m/mixed |\ |_--m/alternative |--\ |__|-text/plain |__|-m/related |____|\ |____|_-text/html |____|_-image/gif _\ __--image/jpeg; c-d: attachment; And I have following lines in output: x01 ... (image/gif data) x02 2VmCcQhSLXoHEy5suCURO3EOFjNu7Pgx5MiSJ1OubPky5syaN3P+FxAAOw== x03 x04 --_----------=_1290472452169070-- x05 x06 x07 --_----------=_1290472452169071-- x08 x09 x10 --_----------=_1290472452169072 x11 Content-Disposition: attachment; filename="13109_big_8061.jpg" x12 ... (image/jpeg attributes) I sign output before send (Using openssl smime -sign). When I open this signed mail in Outlook Express, warning appears that content was modified. Other software accept this mail as signed valid and not modified, but OE wantn`t open e-mail even from a just-signed file. There are no problems with not signed messages. After strong debugging solution was found: output need to be shorter, by remove extra \n x01 ... (image/gif data) x02 2VmCcQhSLXoHEy5suCURO3EOFjNu7Pgx5MiSJ1OubPky5syaN3P+FxAAOw== x03 x04 --_----------=_1290472452169070-- x05 x07 --_----------=_1290472452169071-- x08 x10 --_----------=_1290472452169072 x11 Content-Disposition: attachment; filename="13109_big_8061.jpg" x12 ... (image/jpeg attributes) This solves the problem fully. -- Best regards, Pavel mailto:pavel2000@ngs.ru
From: fschlich [...] zedat.fu-berlin.de
Hi, I can confirm this issue, and it's actually the same as the one reported in https://rt.cpan.org/Public/Bug/Display.html?id=5713 in 2004! It only occurs when the output of MIME::Lite is fed to openssl to produce an SMIME message, only with multipart messages, and AFAIK only with Microsoft MUAs. I'm not sure if MIME::Lite (for producing the extra newline) or rather openssl (for not removing the newline) or Microsoft's MUAs (for choking on them) are to blame, but it's certainly easiest to remove at the source. Does it serve a purpose, actually? On Mon Nov 22 20:18:12 2010, pavel2000@ngs.ru wrote: Show quoted text
> > --- Lite.pm.orig 2010-11-23 06:45:34.000000000 +0600 > +++ Lite.pm 2010-11-23 06:38:20.000000000 +0600 > @@ -2179,7 +2179,7 @@ > } > > ### Epilogue: > - $out->print("\n--$boundary--\n\n"); > + $out->print("\n--$boundary--\n"); > } elsif ( $type =~ m{^message/} ) { > my @parts = @{ $self->{Parts} };
So, could you please consider applying the original reporter's patch? Florian
From: fschlich [...] zedat.fu-berlin.de
FYI, this is the complete patch as applied to the Debian package of MIME::Lite. It adds a fix for a test.
Subject: remove_extra_newline.patch
Description: remove extra newline in MIME structure MUA from MS will barf at the signature when wrapped in SMIME Origin: https://rt.cpan.org/Public/Bug/Display.html?id=63253 --- a/lib/MIME/Lite.pm +++ b/lib/MIME/Lite.pm @@ -2179,7 +2179,7 @@ } ### Epilogue: - $out->print("\n--$boundary--\n\n"); + $out->print("\n--$boundary--\n"); } elsif ( $type =~ m{^message/} ) { my @parts = @{ $self->{Parts} }; --- a/t/types.t +++ b/t/types.t @@ -65,7 +65,6 @@ This isn't really html. We are only checking the filename silly. --_----------=_0-- - EOFEXPECT is($ret, $expect, "we got the message we expected");