[imapfilter-devel] Imapfilter sometimes doesn't filter

David DeSimone fox at verio.net
Tue Jul 27 07:15:24 EEST 2004


Ezsra McDonald wrote:

> I saw a similar problem even in the versions before imapfilter 1.0. My
> observation was that if a imapfilter was executed and before it was
> complete a message was delivered into INBOX the message might get
> filtered by the wrong filter.

Thanks, Ezsra.  That's something that had not occurred to me, but it 
makes perfect sense now that you suggest it.

Using a temp folder seems like a workable solution, but it seems that 
imapfilter could perhaps be smarter somehow.  I'll have to think about this.

It actually bothers me somewhat, that imapfilter treats all operations 
independently.  For instance, when imapfilter performs a "match" 
operation, and next does a "delete" on those results, isn't there a 
chance that some other IMAP client might have connected and moved some 
of the messages around between that time?  Sure, it is a small gap in 
time, but race conditions do happen!  In such a case, imapfilter might 
delete the wrong messages!

Of course, the UID option works fine for this, but it seems to me that 
UID should be a *requirement* for using imapfilter!  It is not safe to 
do otherwise!

What would be really nice, I think, is if the Lua language had some sort 
of support for performing intersections or merges of lists.  For 
instance, I might perform a match on {} to get a list of messages, then 
perform another match to find a subset of the messages that meet certain 
criteria, and move them to another folder, then somehow REMOVE the 
messages that matched the second criteria from the first list, so that 
now I can safely move or delete those results, without worrying about a 
new message that has arrived since I started.

These sorts of functions probably could be written, but my Lua skills 
are not that good.  Something to work on.  :)

Thanks again!

-- 
David DeSimone || "It took me fifteen years to discover that I had no
  Network Admin ||  talent for writing, but I couldn't give it up because
  fox at verio.net ||  by that time I was too famous.  -- Robert Benchley




More information about the Imapfilter-devel mailing list