--------------- -- Options -- --------------- options.timeout = 500 options.subscribe = true ---------------- -- Accounts -- ---------------- vv_vinklat_com = { server = 'orthos.qcm.cz', username = 'vv@vinklat.com', password = 'sahula', } --------------- -- Filters -- --------------- all = { } spam = { 'unseen', 'smaller 50000', } ---------------- -- Commands -- ---------------- results = match(vv_vinklat_com, 'INBOX', spam) bodies = fetchtext(vv_vinklat_com, 'INBOX', results) if (bodies ~= nil) then results = {} for msgid, msgtxt in pairs(bodies) do if (pipe_to('spamc -c -d 192.168.10.2', msgtxt) == 1) then table.insert(results, msgid) end end move(vv_vinklat_com, 'INBOX', vv_vinklat_com, 'spam', results) end