imapfilter
imapfilter copied to clipboard
enter_idle on whole account / support for IMAP NOTIFY
Is it possible to IDLE-wait on any any mailbox of an account? I know you can idle-wait on the inbox with
while true do
success = account.Inbox:enter_idle()
if success then
os.execute('mbsync -a')
end
end
but I also get stuff sent to other folders on the server, is there a way to do something like account.AllTheFolders:enter_idle()
perhaps there's some concurrency feature like race(account.Inbox.enter_idle(), account.Work.enter_idle(), account.Fun.enter_idle())
?
Unfortunately the IMAP IDLE command can only be used on a single mailbox, so something like you describe isn't possible.
It seems that there's the IMAP NOTIFY Extension though, which tries to address these shortcomings as described at the Overview and Rationale section.
This means of course that the server would have to support this extension, and that I would need to add support for the extension to imapfilter...
Feared it might be something like that.
Hm, I use Fastmail which uses Cyrus so server support exists for me … I guess this is a feature request for IMAP NOTIFY support in imapfilter then :)