You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "mike bell (JIRA)" <mi...@james.apache.org> on 2009/11/15 08:58:39 UTC

[jira] Created: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
--------------------------------------------------------------------------------

                 Key: MIME4J-140
                 URL: https://issues.apache.org/jira/browse/MIME4J-140
             Project: JAMES Mime4j
          Issue Type: Bug
    Affects Versions: 0.6
            Reporter: mike bell


I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception

Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).

I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.

I can also open somewhat related JIRAS if people find them of merit:

1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?

Thanks

Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this

Return-Path: <to...@hotmail.com>
Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
	Sun, 28 Dec 2008 18:01:30 -0800
Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
	Sun, 28 Dec 2008 18:01:30 -0800
Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
	 Sun, 28 Dec 2008 18:01:26 -0800
Message-ID: <BA...@phx.gbl>
Content-Type: multipart/mixed;
	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
X-Originating-IP: [96.228.108.66]
From: Tommy Clark <to...@hotmail.com>
To: <al...@thomson.com>,
        Alexandra Droman
	<al...@yahoo.com>,
        Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
        <at...@msn.com>, Ben Greenberg
	<bp...@hotmail.com>,
        blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
        <cl...@hotmail.com>, Dae-Jin Kim
	<po...@chollian.net>,
        Doug Arthur <do...@yahoo.com>,
        Dox Doxiadis
	<ev...@gmail.com>, <do...@princeton.edu>,
        Haidde Sprague
	<ha...@gmail.com>,
        James Lee <jc...@hotmail.com>, Jeff Dorman
	<bu...@aol.com>,
        <je...@gmail.com>, "Jeff Lim (E-mail)"
	<je...@hotmail.com>,
        Jeff Moshman <jm...@sonic.net>, Karen Wolfe
	<ka...@yahoo.com>,
        <ke...@charter.net>, keirabby
	<ke...@cableone.net>,
        <ke...@yahoo.com>, Kerry Levenberg
	<ke...@levenbergs.com>,
        Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
        <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
        Natalie Stange <ns...@nyc.rr.com>,
        karen wolfe
	<ng...@yahoo.com>, <po...@chol.com>,
        Rob Cliver
	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
        the Clarks
	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
        <wh...@yahoo.com>
Subject: N More THANKS
Date: Sun, 28 Dec 2008 18:01:25 -0800
Importance: Normal
In-Reply-To: <BA...@phx.gbl>
References: <c4...@mail.gmail.com>
 <BA...@phx.gbl>
MIME-Version: 1.0
X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Oleg Kalnichevski (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778111#action_12778111 ] 

Oleg Kalnichevski commented on MIME4J-140:
------------------------------------------

> Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. 
> Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules). 

The document that deals with line folding is RFC822 [1]. I personally cannot find any provision in the RFC that supports this claim. My personal interpretation is that a header line can be folded to make it human readable but the total limit of 998 still applies.

If this limit is absurdly low for real world messages, I have no problem increasing it. But there is already a config parameter one can use to override it.

Oleg

[1] http://www.ietf.org/rfc/rfc822.txt

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "mike bell (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778064#action_12778064 ] 

mike bell commented on MIME4J-140:
----------------------------------

Sorry I'm wrong about #2. No bug. Brain fart.

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778299#action_12778299 ] 

Markus Wiederkehr commented on MIME4J-140:
------------------------------------------

Patch committed, please review.

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>            Assignee: Markus Wiederkehr
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778188#action_12778188 ] 

Markus Wiederkehr commented on MIME4J-140:
------------------------------------------

1000 is the perfect default value for MaxLineLen because "each line of characters MUST be no more than 998 characters" (RFC 5322). I believe we count the CRLF in, so 998 + 2 = 1000.

But 1000 clearly is a very bad value for the length of an unfolded header because unfolded headers may be longer. I think the RFC is pretty clear about that.

We should introduce another parameter, maybe MaxHeaderLen or something like that and think of a reasonable default value (50000?).

(And obviously I wasn't arguing about how it works at the moment but how it should work.)

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Oleg Kalnichevski (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778186#action_12778186 ] 

Oleg Kalnichevski commented on MIME4J-140:
------------------------------------------

> No I don't think so

You are very welcome to disagree but this is how it works at the moment. I have no problem with having another parameter but I do not think indefinite line folding should be allowed per default.

Oleg

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778146#action_12778146 ] 

Markus Wiederkehr commented on MIME4J-140:
------------------------------------------

RFC 822 is superseded by RFC 5322 which states that "... to deal with the 998/78 character limitations per line, the field body portion of a header field can be split into a multiple-line representation" (2.2.3. Long Header Fields).

So I think this is a valid issue.

@Oleg: what config parameter are you referring to? Nothing in MimeEntityConfig seems to apply.

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Oleg Kalnichevski (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778153#action_12778153 ] 

Oleg Kalnichevski commented on MIME4J-140:
------------------------------------------

@Markus

MimeEntityConfig#getMaxLineLen()

Oleg

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Oleg Kalnichevski (JIRA)" <mi...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved MIME4J-140.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.7

Marking as resolved

Oleg

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>            Assignee: Markus Wiederkehr
>             Fix For: 0.7
>
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Oleg Kalnichevski (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779045#action_12779045 ] 

Oleg Kalnichevski commented on MIME4J-140:
------------------------------------------

Works for me

Oleg

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>            Assignee: Markus Wiederkehr
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Wiederkehr reassigned MIME4J-140:
----------------------------------------

    Assignee: Markus Wiederkehr

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>            Assignee: Markus Wiederkehr
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778338#action_12778338 ] 

Markus Wiederkehr commented on MIME4J-140:
------------------------------------------

@Mike: Regarding the other issues:

#1 and #2 should be fixed in trunk.

#3: I don't know why that constructor is not public. But do you really want to use MimeTokenStream directly? MimeStreamParser has a public constructor that passes the specified MimeEntityConfig to MimeTokenStream. Please file a separate JIRA if you still want that to be addressed.

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>            Assignee: Markus Wiederkehr
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778172#action_12778172 ] 

Markus Wiederkehr commented on MIME4J-140:
------------------------------------------

In other words MimeEntityConfig#getMaxLineLen() should be used for BufferedLineReaderInputStream as it is but we need something different (or maybe nothing at all) for AbstractEntity#fillFieldBuffer().

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MIME4J-140) MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation

Posted by "Markus Wiederkehr (JIRA)" <mi...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778171#action_12778171 ] 

Markus Wiederkehr commented on MIME4J-140:
------------------------------------------

No I don't think so. MimeEntityConfig#getMaxLineLen() should specify the maximum number of characters a line may have in the raw message. This is _before_ multiple header lines get unfolded into a single line by the parser. An unfolded line may well be longer than this and I don't think we have a configuration parameter for that.

> MIME4J-57 is not practical in its limits and incorrect in its RFC interpretation
> --------------------------------------------------------------------------------
>
>                 Key: MIME4J-140
>                 URL: https://issues.apache.org/jira/browse/MIME4J-140
>             Project: JAMES Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: mike bell
>
> I have begun playing with Mime4j for potential use in a software project. Very quickly I found a simple email (Which i can attach) which has about 30 TO addresses. The default was to throw an exception
> Looking at MIME4J-57 the author has misunderstood the SMTP RFC 2821. Yes you are limited to 998 octets PER LINE, but you may FOLD as many 998 octet lines as you wish. Technically it's 100% legal to have a 50 megabyte header value, as long as it is folded. (per 76 or 998 rules).
> I think the limit chosen by default of 1000 is absurdly low - this should be 100000 minimum or perhaps even unlimited by default. There is something to be said for a sanity check option, for sure - but not one that is triggered so easily.
> I can also open somewhat related JIRAS if people find them of merit:
> 1. Documentation - defaults should be clearly stated in MimeEntityConfig javadoc. They are not
> 2. Bug - The javadocs for MimeEntityConfig claim mc.setMaxHeaderCount(-1); would defeat; this check. It does not (I worked around with Integer.MaxValue)
> 3. Design Question: Should the MimeTokenStream not have a public constructor that allows MimeEntityConfig to be fed. As it was I had to create my own subclass to access the protected constructor - is there a reason for this?
> Thanks
> Example header that blew stuff up (and I think we've all seen far far worse!) - The To line triggers this
> Return-Path: <to...@hotmail.com>
> Received: from c.mx.sonic.net (c.mx.sonic.net [64.142.100.46])
> 	by eth0.a.lds.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21U5h027864;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from bay0-omc2-s13.bay0.hotmail.com (bay0-omc2-s13.bay0.hotmail.com [65.54.246.149])
> 	by c.mx.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id mBT21QuA026548;
> 	Sun, 28 Dec 2008 18:01:30 -0800
> Received: from BAY117-W11 ([207.46.8.46]) by bay0-omc2-s13.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
> 	 Sun, 28 Dec 2008 18:01:26 -0800
> Message-ID: <BA...@phx.gbl>
> Content-Type: multipart/mixed;
> 	boundary="_03df338b-5029-48d8-84e8-34f5e171dcbd_"
> X-Originating-IP: [96.228.108.66]
> From: Tommy Clark <to...@hotmail.com>
> To: <al...@thomson.com>,
>         Alexandra Droman
> 	<al...@yahoo.com>,
>         Alexis Steinkamp <le...@hotmail.com>, <as...@ameritech.net>,
>         <at...@msn.com>, Ben Greenberg
> 	<bp...@hotmail.com>,
>         blythe gross <mu...@yahoo.com>, <br...@mediamystic.com>,
>         <cl...@hotmail.com>, Dae-Jin Kim
> 	<po...@chollian.net>,
>         Doug Arthur <do...@yahoo.com>,
>         Dox Doxiadis
> 	<ev...@gmail.com>, <do...@princeton.edu>,
>         Haidde Sprague
> 	<ha...@gmail.com>,
>         James Lee <jc...@hotmail.com>, Jeff Dorman
> 	<bu...@aol.com>,
>         <je...@gmail.com>, "Jeff Lim (E-mail)"
> 	<je...@hotmail.com>,
>         Jeff Moshman <jm...@sonic.net>, Karen Wolfe
> 	<ka...@yahoo.com>,
>         <ke...@charter.net>, keirabby
> 	<ke...@cableone.net>,
>         <ke...@yahoo.com>, Kerry Levenberg
> 	<ke...@levenbergs.com>,
>         Kim-Chi Steger <kc...@aol.com>, <lo...@hotmail.com>,
>         <mb...@sonic.net>, mike bell <mj...@gwava.com>, <my...@aol.com>,
>         Natalie Stange <ns...@nyc.rr.com>,
>         karen wolfe
> 	<ng...@yahoo.com>, <po...@chol.com>,
>         Rob Cliver
> 	<cl...@fulbrightweb.org>, Sharon Lee <we...@yahoo.com>,
>         the Clarks
> 	<bo...@comcast.net>, Ward Breeze <wb...@gunder.com>,
>         <wh...@yahoo.com>
> Subject: N More THANKS
> Date: Sun, 28 Dec 2008 18:01:25 -0800
> Importance: Normal
> In-Reply-To: <BA...@phx.gbl>
> References: <c4...@mail.gmail.com>
>  <BA...@phx.gbl>
> MIME-Version: 1.0
> X-OriginalArrivalTime: 29 Dec 2008 02:01:26.0088 (UTC) FILETIME=[5B42CC80:01C96959]
> X-Sonic-SB-IP-RBLs: IP RBLs sorbs-spam.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.