[imapfilter-devel] Error: attempt to index field 'INBOX'

Alejandro Jakubi jakubi at df.uba.ar
Fri Oct 19 20:15:01 EEST 2007


Hi,

I have setup a filter function in config.lua (see below the relevant lines).
The intention is that messages with [SPAM] in the subject are moved to the
folder SPAM and become marked as deleted. There is no problem with the moving
part, but adding the third line below (for marking as deleted) generates this
output:

imapfilter: xxxx/.imapfilter/config.lua:3: attempt to index field
'INBOX' (a nil value)

Version of imapfilter is 1.3.

Which is the solution?

Regards, Alejandro


====
function filtrar()
 	r_spam = match(account1, 'INBOX', spam)
         account1.INBOX:mark_deleted(r_spam)
 	move(account1, 'INBOX', account1, 'mail/SPAM', r_spam)
...
end

options.timeout = 120
options.subscribe = true

...

spam = {
 	'subject "[SPAM]"',
}

...

filtrar()

===




More information about the Imapfilter-devel mailing list