imapfilter hinzugefügt

This commit is contained in:
borgal
2022-10-26 16:01:00 +00:00
parent 1fff77ff62
commit ce2c9481a6
3 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
---------------
-- Options --
---------------
options.timeout = 120
options.subscribe = true
options.limit = 50
----------------
-- Accounts --
----------------
account1 = IMAP {
server = 'imap.server.de',
username = 'ChangeMe',
password = 'ChangeMe',
ssl = 'ssl3',
}
-----------------
-- Mailboxes --
-----------------
check = account1.INBOX:check_status()
-- SPAM --
while true do
account1.INBOX:enter_idle()
results = account1.INBOX:contain_field('X-Spam-Status','Yes') +
account1.INBOX:contain_subject('Betreff Inhalt 1') +
account1.INBOX:contain_subject('Betreff Inhalt 2') +
account1.INBOX:contain_message('Text Inhalt 1') +
account1.INBOX:contain_message('Text Inhalt 2')
results:move_messages(account1['Spam'],results)
end