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.
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.
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.
One other thing about fetchmail:
A store for message IDs is needed for solving the SEEN flag problem. I
was thinking of adding some sql statements to the "sqlResources.xml" and
use the JAMES internal repository. Creating a new one(Derby or whatever)
just for storing the already fetched message IDs would be a waste. Do
you think this is possible? Could you give me some clues on how to
access the repository?
As I said, I would be glad to help and contribute, but I will definitely
need some help from the other contributors - otherwise it will take me
too much time to reinvent all and I just don't have it right now.
Thank you.
P.S.
I continued the topic here and not in the server mailing lists because I
still think it is a matter of how mailets are processed, which in turn
may affect the mailet API. Do you agree on that?