summaryrefslogtreecommitdiff
path: root/.config/maildirproc/purdue.rc
diff options
context:
space:
mode:
Diffstat (limited to '.config/maildirproc/purdue.rc')
-rw-r--r--.config/maildirproc/purdue.rc58
1 files changed, 48 insertions, 10 deletions
diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc
index 0ffc1e6..6d4b913 100644
--- a/.config/maildirproc/purdue.rc
+++ b/.config/maildirproc/purdue.rc
@@ -27,7 +27,7 @@ def piazza_topic(mail, topic):
return (
is_to_or_from(mail, topic+" on Piazza")
or mail["Subject"].contains(topic+" on Piazza"))
-
+
def my_filters(mail):
# Generic stuff ########################################################
@@ -37,11 +37,11 @@ def my_filters(mail):
or is_to_or_from(mail,"Purduealumni@purdue.edu")
or is_to_or_from(mail,"pase@purdue.edu")
):
- mail.move("INBOX.PASE")
+ mail.move("INBOX.crap.PASE")
return
if mail["Subject"].contains("[PLUG]"):
- mail.move("INBOX.PLUG")
+ mail.move("INBOX.crap.PLUG")
return
if mail["From"].matches(".*bursar.*@purdue\.edu"):
@@ -49,15 +49,19 @@ def my_filters(mail):
return
if mail["From"].contains("mailhub-admin@purdue.edu"):
- mail.move("INBOX.mailhub-admin")
+ mail.move("INBOX.crap.mailhub-admin")
return
if mail["From"].matches("pmx-.*@purdue.edu"):
- mail.move("INBOX.spam")
+ mail.move("INBOX.crap.spam")
return
if is_to_or_from(mail,"linkedin.com"):
- mail.move("INBOX.LinkedIn")
+ mail.move("INBOX.crap.LinkedIn")
+ return
+
+ if is_to_or_from(mail,"follet.com"):
+ mail.move("INBOX.Follet")
return
if (
@@ -65,12 +69,14 @@ def my_filters(mail):
or is_to_or_from(mail,"@edrtrust.com")
or is_to_or_from(mail,"@propertysolutions.com")
or is_to_or_from(mail,"collegestationapartments@gmail.com")
+ or is_to_or_from_re(mail,"collegestationca\..*@gmail.com")
+ or is_to_or_from(mail, "@duke-energy.com")
):
- mail.move("INBOX.CollegeStation")
+ mail.move("INBOX.housing.CollegeStation")
return
if mail["From"].matches("facebook(|mail)\.com"):
- mail.move("INBOX.Facebook")
+ mail.move("INBOX.crap.Facebook")
return
if (
@@ -78,7 +84,7 @@ def my_filters(mail):
or is_to_or_from(mail,"@cable.comcast.com")
or is_to_or_from(mail,"@apexsystemsinc.com")
):
- mail.move("INBOX.Comcast")
+ mail.move("INBOX.work.Comcast")
return
if (
@@ -86,7 +92,10 @@ def my_filters(mail):
or mail["Subject"].contains("[CS Opportunity Update]")
or mail["Subject"].contains("[CS Majors]")
):
- mail.move("INBOX.CS")
+ mail.move("INBOX.crap.CS")
+ return
+ if (mail["From"].contains("shumakl@cs.purdue.edu") and mail["Subject"].matches("^cron:")):
+ mail.move("INBOX.crap.cron")
return
# Fall 2012 ############################################################
@@ -145,6 +154,35 @@ def my_filters(mail):
mail.move("INBOX.classes.2013-2.MA265")
return
+ # Spring 2014 ##########################################################
+
+ # COM217
+ if mail["Subject"].contains("Spring-2014-COM-21700-004"):
+ mail.move("INBOX.classes.2014-1.COM217")
+ return
+ if mail["From"].contains("mixable") and mail["Subject"].matches("^COM 21700"):
+ mail.move("INBOX.classes.2014-1.COM217.Mixable")
+ return
+ # CS252
+ if piazza_topic(mail, "CS 25200"):
+ mail.move("INBOX.classes.2014-1.CS252.Piazza")
+ return
+ # CS307
+ if is_to_or_from(mail, "dunsmore@purdue.edu") or mail["Subject"].contains("Spring-2014-CS-30700-LE1"):
+ mail.move("INBOX.classes.2014-1.CS307")
+ return
+ # SPAN102
+ if mail["Subject"].contains("spring-2014-span-102"):
+ mail.move("INBOX.classes.2014-1.SPAN102")
+ return
+ # STAT350
+ if is_to_or_from(mail, "ssellke@purdue.edu"):
+ mail.move("INBOX.classes.2014-1.STAT350")
+ return
+ if piazza_topic(mail, "STAT 35000 (SELLKE)"):
+ mail.move("INBOX.classes.2014-1.STAT350.Piazza")
+ return
+
handle_mapping = {
"INBOX": my_filters,
}