james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Knystautas <ser...@lokitech.com>
Subject Re: stream-based MIME parser
Date Sun, 11 Apr 2004 18:01:25 GMT
Noel J. Bergman wrote:
> To quote Joe: "It transparently decodes Base64 and quoted-printable on
> demand (i.e., doesn't base64-decode that 5MB binary attachment until you
> actually ask for its bytes).  It successfully deals with the
> "torture-test.mbox" message posted by Mark Crispin:
> http://groups.google.com/groups?selm=Pine.LNX.4.50.0205061424260.5068-100000
> %40shiva0.cac.washington.edu.  Also I believe it should deal quite
> gracefully with prematurely truncated nested body parts, illegal headers,
> illegal base64/quoted-printable encoding, and assorted other nastiness."
> Joe indicates that he is very interested in continuing to maintain and
> evolve it with us.

Very cool.

>   - For those currently thinking that we don't need an
>     alternative to JavaMail, think of this playing the
>     same role that SAX does to DOM.

Good analogy.

>   - org.apache.mailet.Mail could allow one to query the
>     message as either a stream or a JavaMail message.

This helps a bit, namely reading.  It would ideal to support part 
modification as well, something SAX doesn't do.

>   - most matchers could use this package, rather than
>     JavaMail.

Agreed, I like exposing both versions of the message.

>   - many mailets could also use it, once support is
>     added for doing simple things.

Yes, editing is key, and I'd like to see how we could do "simple" things.

>   - It would not take much to modify it to support
>     push processing (java.nio model).


> The whole package is about 50K of code.  We should probably import this
> through the Incubator as a pass-through for James.  I'm not sure if it would
> be best to add it as org.apache.james.util.mime, and perhaps eventually
> migrate to Jakarta Commons, or to include it within the Mailet API.

Why in Jakarta commons instead of James?

One related issue is this may make the database store less useful... 
some databases don't stream out of the database as well, so we'd still 
effectively transfer the entire message each check.  MSSQL/Sybase don't. 
  Not sure of others.  We might need to add a cache for the db store.

Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message