Bug#460411: MIME::Entity wrong about *digest* boundaries
jidanni at jidanni.org
jidanni at jidanni.org
Sat Jan 12 14:02:58 UTC 2008
X-Debbugs-CC: mimedefang at lists.roaringpenguin.com, dfs at roaringpenguin.com
Package: libmime-perl
Version: 5.425-1
I visited http://www.mimedefang.org/ but could not find a Submit Bug
button. Never mind.
MIME::Entity has got it wrong about *digest* boundaries.
On the MIME:Entity man page, there are no blank lines added after
boundary, but it's not a digest:
From: me
To: you
Content-type: multipart/mixed; boundary="----abc----"
------abc----
Content-type: text/plain
Content-length: 12
Hello there!
------abc------
Here he won't let us get a newline in:
Boundary
Multipart entities only. Optional. The boundary string. As per RFC-2046, it must consist only of the
characters "[0-9a-zA-Z'()+_,-./:=?]" and space (you'll be warned, and your boundary will be ignored, if
this is not the case). If you omit this, a random string will be chosen... which is probably safer.
MIME:Tools man page:
Inability to handle multipart boundaries with embedded newlines
Let's get something straight: this is an evil, EVIL practice. If your
mailer creates multipart boundary strings that contain newlines, give
it two weeks notice and find another one. If your mail robot receives
MIME mail like this, regard it as syntactically incorrect, which it is.
OK BUT, all I know is mutt(1) (v key) and gnus (^D key) want them
on *digests*, else the digest won't get parsed. That is why I am here
today complaining to you. I bet squirrelmail wants them too.
Now looking at RFC 2046: yes there are blank lines added after the
digest boundaries:
------ main boundary ---- <<---no blank line added.... but it's not a digest boundary
Content-Type: multipart/digest;
boundary="---- next message ----"
------ next message ---- <<---yes blank line added
From: someone-else
Date: Fri, 26 Mar 1993 11:13:32 +0200
Subject: my opinion
...body goes here ...
------ next message ---- <<---yes blank line added
From: someone-else-again
Date: Fri, 26 Mar 1993 10:07:13 -0500
Subject: my different opinion
... another body goes here ...
Of course I can only tell you that's what I see, as I have lost the
ability to analyze the descriptions of these protocols.
OK, so how can one defeat MIME::Entity to get the bloody newline in?
my $repair = $top->stringify;
$repair =~ s/^------------=_.*/$&\n/gm;
See http://jidanni.org/comp/spam/reporter
X-Mailer: MIME-tools 5.425 (Entity 5.425)
P.S., One notes some trailing blanks (use cat -e to see) on folded headers...
More information about the pkg-perl-maintainers
mailing list