Hi.

Actually, this is both malet API and fetchmail question.

The case:
I am using fetchmail, but there is a problem with the SEEN flag - it is not permanent, thus, resulting in all mails fetched each time the fetch job starts. I've read about that in the mail list archives but the only solution I found was to delete the messages from server. However, this is not a workaround for me - to leave messages on server is a valid option for my users. (Is there any other workaround which I don't know of?). What I thought is to implement a matcher/mailet which intercepts the incoming mails fetched by fetchmail and decides whether to discard them or not. I have written the matcher and it works OK(parses the JAMES configuration and checks for the fetch job names in the attributes of intercepted messages). The only thing I have to implement is to have some way to understand whether the message has been already delivered or not(The only thing I could thing of now is to implement some db storage with the recieved message IDs - any ideas appreciated).

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? 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.

I appreciate any help. Thank you.

Reply via email to