On 9/21/07, Lyubomir Dokov <[EMAIL PROTECTED]> wrote:
> Robert, thanks for your reply.
>
> I would be happy to help and contribute. However, I need to look through
> the code first and see how much time would it take - I have deadlines to
> catch in my project.

of course

> On the question:
> > the approach sounds reasonable to me. it could be made to work by
> > modifying fetchmail so that the message is lazily loaded.
> No matter how fetchmail works, I think that having a way to process
> headers only is a good idea for JAMES as a whole. Meaning, not only
> messages fetched by fetchmail, but also recieved the ordinary way - when
> they are sent to JAMES. Does that make sense? I was thinking about
> adding a separate processor of some kind that would be invoked with the
> message headers only(meaning malets and matchers have access only to
> headers, not the whole MimeMessage). Do you think that is possible and
> good solution? I am working with JAMES for 3-4 days now and I am still
> new. Thats why I am so unsure of myself.

i feel that MailMessage is a little heavyweight and that a lighter
abstraction may be better but this is a minority opinion. providing
that the MailMessage implementation is lazy loaded (in other words,
the headers and the body are loaded only when needed) then there is
really no need for a separate abstraction to achieve what you need.

> > ATM fetchmail uses javamail so this usually depends on sun's
> > implementation. it is possible (though unlikely) that the body will
> > not be downloaded until it's needed. sniffing the protocol exchange
> > should tell you whether it does.
> Today, I didn't had much time to investigate, but as far as I remember
> there was sample mailets adding text to the body of the message, thus,
> meaning the whole message is downloaded and then given to the mailet
> chain. However, I will look more when I have the time.

the question is whether sun's MimeMessage implementation for POP3 is
lazy loading (and so will only load the body when a method call
requires it).  if the MimeMessage implementation is lazy loading then
the content will not be downloaded until needed.

if sun's implementation is not lazy loading then it may be necessary
to create a new implementation of MimeMessage based on commons net
which is.

- robert

Reply via email to