is_older() and arrived_before() seem to be broken on the 'personal' folder
Something odd is happening and I can't put my finger on it.
I'm trying to filter mails older than 6 months and move them into a different (archive) folder.
However, is_older() is not working well for me on my main (personal) mail folder.
It works on other folders, just not that one.
is_newer() and arrived_since() do seem to be working as expected however.
Please find some examples below.
is_older() is broken on personal
test = LINARO.personal:is_older(20)
local count = 0 for m,n in ipairs(test) do count = count + 1 end print(count) 0
arrived_before() is also broken on personal
test = LINARO.personal:arrived_before("01-Feb-2021")
local count = 0 for m,n in ipairs(test) do count = count + 1 end print(count) 0
test = LINARO.personal:arrived_before("01-Mar-2022")
local count = 0 for m,n in ipairs(test) do count = count + 1 end print(count) 0
is_older() works fine on a different folder
test = LINARO.stable:is_older(20)
local count = 0 for m,n in ipairs(test) do count = count + 1 end print(count)
167770
arrived_before() also works fine on a different folder
test = LINARO.stable:arrived_before("01-Feb-2021") local count = 0 for m,n in ipairs(test) do count = count + 1 end print(count) 103224
is_newer() works fine everywhere
test = LINARO.personal:is_newer(20)
local count = 0 for m,n in ipairs(test) do count = count + 1 end print(count) 1195
arrived_since() also works fine everywhere
test = LINARO.personal:arrived_since("01-Feb-2021")
local count = 0 for m,n in ipairs(test) do count = count + 1 end print(count) 23563
test = LINARO.personal:arrived_since("01-Mar-2022")
local count = 0 for m,n in ipairs(test) do count = count + 1 end print(count) 497
Well, it looks like a server issue, since imapfilter just does some search queries for those function towards the server.
You can actually see the search queries sent in the output file debug.log if you run it with imapfilter -d debug.log.
You can then compare what imapfilter sends and what it gets back from the server, on the mailbox that works and those that don't work.
I am also wondering whether you get some error on the broken queries; it should be obvious by inspecting the debug file.