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.rc24
1 files changed, 18 insertions, 6 deletions
diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc
index 4277a54..0199c30 100644
--- a/.config/maildirproc/purdue.rc
+++ b/.config/maildirproc/purdue.rc
@@ -31,16 +31,16 @@ def piazza_topic(mail, topic):
def my_filters(mail):
# Generic stuff ########################################################
- if mail["Subject"].contains("[PASE]"):
- mail.move("INBOX.PASE")
- return
-
if (
- False
- or mail["Subject"].contains("[PLUG]")
+ False
+ or mail["Subject"].contains("[PASE]")
or is_to_or_from(mail,"Purduealumni@purdue.edu")
or is_to_or_from(mail,"pase@purdue.edu")
):
+ mail.move("INBOX.PASE")
+ return
+
+ if mail["Subject"].contains("[PLUG]"):
mail.move("INBOX.PLUG")
return
@@ -113,6 +113,18 @@ def my_filters(mail):
mail.move("INBOX.classes.2013-1.SOC220")
return
+ # Fall 2013 ############################################################
+
+ if piazza_topic(mail, "CS 250") piazza_topic(mail,"CS 250-FALL2013") or mail["Subject"].contains("Fall-2013-CS-25000"):
+ mail.move("INBOX.classes.2013-2.CS250")
+ return
+ if piazza_topic(mail, "CS 251") or mail["Subject"].contains("Fall-2013-CS-25100"):
+ mail.move("INBOX.classes.2013-2.CS251")
+ return
+ if mail["Subject"].contains("Fall-2013-SPAN-10100"):
+ mail.move("INBOX.classes.2013-2.CS251")
+ return
+
handle_mapping = {
"INBOX": my_filters,
}