[imapfilter-devel] Re: iterate on defined filters
David DeSimone
fox at verio.net
Wed Aug 18 19:58:18 EEST 2004
David DeSimone <fox at verio.net> wrote:
>
> LIST =
> {
> "mailer_daemon" =
> {
> 'to "postmaster"',
> 'subject "returned mail",
> },
>
> "nagios" =
> {
> 'from "root"',
> 'subject "NAGIOS alert",
> }
> }
Grr, sorry to post this error-ridden code.
Quotes are not neeeded (and are in fact a syntax error) when specifying
keys, so the above should look like this:
LIST =
{
mailer_daemon =
{
'to "postmaster"',
'subject "returned mail",
},
nagios =
{
'from "root"',
'subject "NAGIOS alert",
}
}
> for list, query in pairs(LIST)
> do
> -- print("list is " .. list)
> -- print("query is:")
> -- for k, v in ipairs(query)
> -- do
> print(" " .. v)
> -- end
Here I forgot a comment marker, but you probably figured that out. :)
--
David DeSimone || Network Admin || fox at verio.net
"It took me fifteen years to discover that I had no
talent for writing, but I couldn't give it up because
by that time I was too famous. -- Robert Benchley
More information about the Imapfilter-devel
mailing list