[imapfilter-devel] IMAPFilter 2.1

Lefteris Chatzimparmpas lefcha at hellug.gr
Tue Nov 24 10:12:52 EET 2009


On Mon, Nov 23, 2009 at 06:03:39PM -0500, William Faulk wrote:
> I've been waiting for this for quite some time.
>
> However...
>
> Am I correct in interpreting enter_idle() as effectively just being a  
> timer?  It doesn't return any information about any messages that have  
> been received during its IDLE state?

Yes, it just waits for a server notification and returns when it got
one, so basically you know that new mail has arrived and you don't need
to poll repeatedly.

> I was hoping that it would return a table of newly received messages, so  
> that I could then run filters against just those messages, rather than  
> searching through the entire mailbox every time.

I believe in the notifications sent from the server, you don't get which
messages have arrived, but only the number of them (eg. "12 EXISTS", "1
RECENT", "2 EXPUNGE", etc.), but maybe some servers return more detailed
untagged responses, though I haven't seen any myself.

> Am I misinterpreting the command?  If not, is there any plan to add  
> support for reporting untagged responses?

I can add in the returned arguments the untagged responses, but I
believe it won't be very useful, based on what you expected.

What you could do after you get a successful return from IDLE is a
search with for example is_new(), which will give you all the newly
arrived messages.

>
> -Bitt
> _______________________________________________
> Imapfilter-devel mailing list
> Imapfilter-devel at lists.hellug.gr
> http://lists.hellug.gr/mailman/listinfo/imapfilter-devel


More information about the Imapfilter-devel mailing list