summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-08 12:31:52 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-08 12:31:52 -0400
commit9c7d45f8a27600d0e8d1b6521bbaee7a4c0e451b (patch)
treec5491a204845cd86e8a1633be39ea70189eed97a
parent19f8cc45d080f4f499872854b9974148ae0cf6ab (diff)
maildirproc: add my Fall 2013 classes, fix the PASE and PLUG rules
-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,
}