You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bu...@apache.org on 2003/03/15 18:40:46 UTC
DO NOT REPLY [Bug 18028] New: -
Redirect mailet mishandles message.getContent()
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18028>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18028
Redirect mailet mishandles message.getContent()
Summary: Redirect mailet mishandles message.getContent()
Product: James
Version: 2.1
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Mailet API
AssignedTo: james-dev@jakarta.apache.org
ReportedBy: cmeans@intfar.com
If Redirect handles a message where the content type is multipart, then the
message itself is not redirected only something like:
javax.mail.internet.MimeMultipart@caf6c1
gets sent as the message body.
(Comments from Noel): Redirect calls message.getContent().toString(). The
problem is that the getContent() method returns a String if the content is
"text/plain", an InputStream if it there is no DataHandler, and a Multipart
object if the content is a multipart type.
This bug can be reproduced by configuring the mailet with <inline> all
</inline> parameter, and then sending a message in HTML that would trigger the
mailet:
<mailet match="RecipientIs=bad@domain.tld"
class="Redirect">
<recipients> postmaster@domain.tld </recipients>
<inline> all </inline>
<replyto> postmaster </replyto>
<static> true </static>
<passThrough> false </passThrough>
</mailet>
Though I've only tested this on WinNT v4.0 SP6a, JDK 1.4.1_01, and James
2.1.2a2, given the Redirect code is the same on all platforms, it is expected
to have the same problem on all platforms and environments.
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org