[imapfilter-devel] Action on a Group of Folders

Paul imapfilter at airbred.com
Sun Apr 18 05:38:14 EEST 2010


Hello,

Lets say I have a list of folders that I want to "mark read".  I'd like 
to do something like this:

--
account = IMAP { server = 'imap', username = 'user', password = 'password'

autoread = { 
".personal.cron",".business.cron",".personal.forums.mailinglist",".business.forums" 
}

results = {}

for _,folder in pairs(autoread) do
   results = results + account.['folder']:select_all()
end

results:mark_seen()
--

My question is more to fill in a gap in my understand of lua metatables, 
rather than imapfilter itself - can anyone tell me how I can reference a 
mailbox by name from a variable like this?

Thanks,

Paul








More information about the Imapfilter-devel mailing list