Closed shartge closed 9 years ago
Please, try again now, thanks!
if mesgs == nil or #mesgs == 0 or then
Please remove the or
before then
.
Thank you, works fine now.
Damn, this isn't my night (and it's like 31°C here)...
Not much cooler here. But I think we found and you fixed the problems. And improved the filtering quite a bit. This issue can be closed, I think.
I agree!
Closed by f6e68bf62000b0c45b78b042fe651fe686a46938 and later commits.
Hi!
I am unsure if I am using imapfilter correctly but it looks like that meta-searching, while selecting the correct subset of messages, always searches all messages on the server and not the range of UID returned by the previous operation.
For example, this simple configuration, just selecting the messages since yesterday and then further selecting some mails with a specific header value:
And this is the debuglog (I trimmed the STARTTLS and LOGIN phase) generated:
As you can see, it first gets a list of UIDs from the "SEARCH ALL SINCE 26-May-2015" and then, when searching for the "List-Id" just uses "ALL" again instead of search only in the UIDs gathered via the first query.
From looking at the code in mailbox.lua and common.lua it seems that meta-searching only happens inside of imapfilter and is never used to optimize the queries send to the server. Which would explain why my simple example takes 15s to execute on a big INBOX.
Or I am doing something stupid and I am using imapfilter in the wrong way.