[imapfilter-devel] Action on a Group of Folders
Lefteris Chatzimparmpas
lefcha at hellug.gr
Sun Apr 18 18:44:14 EEST 2010
Hello
Are those mailboxes named like that with a dot in the beginning? Looks
strange...
Here's a similar example that should work if you folders "personal" and
"business", or "INBOX.personal" and "INBOX.business" if your server's
hierarchy starts from INBOX and below:
account = IMAP {
server = 'imap',
username = 'user',
password = 'password'
}
autoread = {
'personal/cron',
'business/cron',
'personal/forums/mailinglist',
'business/forums'
}
results = Set {}
for _, folder in ipairs(autoread) do
results = results + account[folder]:select_all()
end
results:mark_seen()
On 04/18/2010 04:38 AM, Paul wrote:
>
> 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
>
>
>
>
>
>
> _______________________________________________
> Imapfilter-devel mailing list
> Imapfilter-devel at lists.hellug.gr
> http://lists.hellug.gr/mailman/listinfo/imapfilter-devel
More information about the Imapfilter-devel
mailing list