[imapfilter-devel] IMAPFilter 2.1

William Faulk wfaulk at cortina-systems.com
Wed Nov 25 23:53:09 EET 2009


On 11/25/2009 04:32 PM, Lefteris Chatzimparmpas wrote:
>
> You can always get only recent/new/unread/etc. messages when filtering
> and it will be quite fast as long as you don't use regex matching with
> the match_*() methods.

Unfortunately, none of the stateless searches is guaranteed to do the 
right thing, assuming the right thing is to apply filters to all 
messages that have just arrived, and only those.

If you have another IMAP session open, it is not guaranteed that the 
server will set \Recent on newly arrived messages in IMAPFilter's session.

There's also no guarantee that another IMAP session won't set a 
message's \Seen flag before IMAPFilter gets to it.

NEW doesn't work, either, as it relies on both \Recent and (the lack of) 
\Seen.

My point is that the only guaranteed way to know what messages have 
actually arrived during an IMAP session is to follow EXISTS and EXPUNGE 
responses.

-Bitt

PS: You have a documentation bug in imapfilter_config.5.  The 
description of is_recent() says "this session is not the first to have 
been notified about these messages", when it should say that it is.


More information about the Imapfilter-devel mailing list