Last active
December 18, 2015 18:19
-
-
Save fredsmith/5824427 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- This is a config file for imapfilter. | |
--- | |
--- Syntax example: https://github.com/lefcha/imapfilter/blob/master/samples/config.lua | |
--- or: http://defi.ant.ly/2010/12/imapfilter-a-scriptable-email-processor/ | |
account1 = IMAP { | |
server = 'imap.nuance.com', | |
username = 'fred_smith', -- change me! | |
port = 993, | |
ssl = 'tls1' | |
} | |
-- account1.INBOX:check_status() | |
--- Zenoss messages | |
results = account1['INBOX']:contain_from('[email protected]') | |
results:mark_seen() | |
results:move_messages(account1['INBOX/Zenoss']) | |
--- Grid Automation messages | |
results = account1['INBOX']:contain_subject('[automation]') + | |
account1['INBOX']:contain_subject('sync results') | |
results:mark_seen() | |
results:move_messages(account1['INBOX/Automation']) | |
--- Grid Automation messages | |
results = account1['INBOX']:contain_subject('Daily UNV+ Credit') + | |
account1['INBOX']:contain_subject('Daily GPFS report') + | |
account1['INBOX']:contain_subject('Daily SGE report') | |
results:mark_seen() | |
results:move_messages(account1['INBOX/Reports']) | |
--- JIRA | |
results = account1['INBOX']:contain_subject('[JIRA]') | |
results:mark_seen() | |
results:move_messages(account1['INBOX/JIRA']) | |
--- Old, read, unflagged Messages | |
results = (account1['INBOX']:is_older(5) * | |
account1['INBOX']:is_seen() ) - | |
account1['INBOX']:is_flagged() | |
results:move_messages(account1['INBOX/Archive']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment