On 9/20/07, Lyubomir Dokov <[EMAIL PROTECTED]> wrote:
> Hi.
>
> Actually, this is both malet API and fetchmail question.

(i'm going to approach this as a fetchmail problem. if other see
better solutions using mailets then hopefully they'll jump in.)

> The problem:
> This is something that could ruin my whole approach to the problem: What
> happens if I have a 10MB(or 100MB) message in my INBOX? Is it downloaded
> by the fetcmail job and then given to the mailet chain?

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.

> If so, I will
> download hundreds of megabytes just to discard them from the
> mailet/matcher. That would be stupid. Is this the way it works, or is
> there some place where I could put mailets which are invoked with just
> the headers of the message(I know this is possible in the mail protocols
> - to get the headers only). Or, is my whole understanding of how the
> things work wrong?
>
> Even if my approach to solving the fetchmail problem is wrong, the case
> where you need to have mailets to match headers only is still valid.

the approach sounds reasonable to me. it could be made to work by
modifying fetchmail so that the message is lazily loaded. this will
most likely require some rewriting of the fetchmail module. i'm not
sure if there are any developers with time and enthusiasm to take this
on but if you want to develop it, i'm sure be happy to help out
answering questions and so on.

if rewriting fetchmail is on the agenda, then the most performant
solution would be to address this directly in the fetchmail module.
would probably mean porting (a version of) fetchmail to use commons
net pop3 client (but this would be a good thing anyway).

- robert

Reply via email to