dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit ce4029a68adba02414e7187a8b90a0bc1e04b06b
parent 207e7594535b48beccc29fb79e8f1f12636194f1
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 26 Mar 2019 14:04:09 +0100

Remove old imapfilter configs

Diffstat:
D.imapfilter/noaa.lua | 21---------------------
D.imapfilter/riseup.lua | 170-------------------------------------------------------------------------------
2 files changed, 0 insertions(+), 191 deletions(-)

diff --git a/.imapfilter/noaa.lua b/.imapfilter/noaa.lua @@ -1,21 +0,0 @@ --- see `man imapfilter_config` for info on options - --- function to strip trailing newlines piped from ~/.mutt/offlineimap.py -function trim(s) - return (s:gsub("^%s*(.-)%s*$", "%1")) -end - -status, pass = pipe_from("python ~/.mutt/offlineimap-password-store.py anders.damsgaard@noaa.gov") -account = IMAP { - server = 'imap.gmail.com', - username = 'anders.damsgaard@noaa.gov', - password = trim(pass), - ssl = 'tls1' -} - --- Mark AOS emails as seen in NOAA account -results = account.INBOX:is_unseen():match_to("oar.gfdl.forrestal@noaa.gov") -results:mark_seen() - -results = account.INBOX:is_unseen():match_to("oar.gfdl.public_events@noaa.gov") -results:mark_seen() diff --git a/.imapfilter/riseup.lua b/.imapfilter/riseup.lua @@ -1,170 +0,0 @@ --- see `man imapfilter_config` for info - - --- function to strip trailing newlines piped from ~/.mutt/offlineimap.py -function trim(s) - return (s:gsub("^%s*(.-)%s*$", "%1")) -end - - --------------- --- Accounts -- --------------- - ---status, pass = pipe_from("python ~/.mutt/offlineimap.py andersd mail.riseup.net") -status, pass = pipe_from("python ~/.mutt/offlineimap-password-store.py andersd@riseup.net") -account = IMAP { - server = 'mail.riseup.net', - username = 'andersd', - password = trim(pass), - ssl = 'ssl23' -} - --- Get a list of the available mailboxes and folders ---mailboxes, folders = account:list_all() - --- Get a list of the subscribed mailboxes and folders ---mailboxes, folders = account:list_subscribed() - - -------------------- --- Mailbox rules -- -------------------- - --- Get the status of a mailbox ---account.INBOX:check_status() - --- Get all the messages in the mailbox ---results = account.INBOX:select_all() - --- Get newly arrived, unread messages ---results = account.INBOX:is_new() - --------------------- --- Spam filtering -- --------------------- ---all = account.INBOX:select_all() -all = account.INBOX:is_new() -spam = Set {} -unsure = Set {} -for _, msg in ipairs(all) do - mbox, uid = unpack(msg) - text = mbox[uid]:fetch_message() - flag = pipe_to('bogofilter', text) - if (flag == 0) then - table.insert(spam, msg) - elseif (flag == 2) then - table.insert(unsure, msg) - end -end ---account:create_mailbox('Spam/unsure') -spam:move_messages(account['Spam']) ---unsure:copy_messages(account['Junk/unsure']) -unsure:move_messages(account['Spam/unsure']) - - --- Debian announcements list -- -addr = 'debian-announce@lists.debian.org' -mailbox = 'debian-announce' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian laptop list -- -addr = 'debian-laptop@lists.debian.org' -mailbox = 'debian-laptop' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian news list -- -addr = 'debian-news@lists.debian.org' -mailbox = 'debian-news' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian photo list -- -addr = 'debian-photo@lists.debian.org' -mailbox = 'debian-photo' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian security list -- -addr = 'debian-security-announce@lists.debian.org' -mailbox = 'debian-security-announce' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian security list -- -addr = 'debian-security@lists.debian.org' -mailbox = 'debian-security' -----account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian danish list -- -addr = 'debian-user-danish@lists.debian.org' -mailbox = 'debian-user-danish' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian security announcements list -- -addr = 'debian-security-announce@lists.debian.org' -mailbox = 'debian-security' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian testing security announcements list -- -addr = 'debian-testing-security-announce@lists.debian.org' -mailbox = 'debian-security' -----account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Debian science list -- -addr = 'debian-science@lists.debian.org' -mailbox = 'debian-science' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- VTK users list -- -addr = 'vtkusers@vtk.org' -mailbox = 'vtk-users' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - --- Paraview list -addr = 'paraview@paraview.org' -mailbox = 'vtk-users' ---account:create_mailbox(mailbox) ---account:subscribe_mailbox(mailbox) -results = account.INBOX:contain_to(addr) + account.INBOX:contain_cc(addr) -results:move_messages(account[mailbox]) - - --- Delete old DMI byvejr alerts -- -results = account.INBOX:contain_subject('Byvejr: ') * account.INBOX:is_older(1) -results:delete_messages() - --- Scholar alerts -- -results = account.INBOX:contain_from('scholaralerts-noreply@google.com') -results:move_messages(account['academic-alerts']) -