summaryrefslogtreecommitdiff
path: root/.config/maildirproc
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-21 16:10:08 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-21 16:10:08 -0400
commit927aedb7605bba96a6ea2fc707ab026946b4d2b0 (patch)
tree46bfb8d23985fe08bd7793c417321ad27f6fcb8b /.config/maildirproc
parentb0cdbb3da2c2b36d3c65b00db4eaf5a0d29c2cd6 (diff)
backport changes from my laptop
Diffstat (limited to '.config/maildirproc')
-rw-r--r--.config/maildirproc/att.rc33
-rw-r--r--.config/maildirproc/purdue.rc58
2 files changed, 71 insertions, 20 deletions
diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc
index e862b3f..381ce8f 100644
--- a/.config/maildirproc/att.rc
+++ b/.config/maildirproc/att.rc
@@ -76,7 +76,7 @@ def handle_incoming_unknown(mail):
def my_filters(mail):
# Sort mail from GNU mailing lists
- for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub', 'bug-gnuzilla' ]:
+ for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub', 'bug-gnuzilla', 'bug-librejs' ]:
if (
False
or mail["List-Id"].matches(list+"\.gnu\.org")
@@ -101,6 +101,9 @@ def my_filters(mail):
if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"):
if mail["From"].contains("monit@"):
if mail["Message-Id"].contains("@repo.parabolagnulinux.org"):
+ if mail["Subject"].matches("^\[Maintenance\] monit alert -- (Execution|Connection) (succeeded|failed) sshd$"):
+ mail.move(".software.parabola-maintenance.monit-repo.sshd")
+ return
mail.move(".software.parabola-maintenance.monit-repo")
return
if mail["Message-Id"].contains("@rshg054.dnsready.net"):
@@ -125,6 +128,9 @@ def my_filters(mail):
or is_to_or_from(mail, "parabolagnulinux.org")
or is_to_or_from(mail, "kiwwwi.com.ar")
):
+ if mail["Subject"].contains("[Django]"):
+ mail.move(".software.parabola-maintenance.django")
+ return
mail.move(".software.parabola-dev")
return
@@ -132,6 +138,10 @@ def my_filters(mail):
mail.move(".software.pacman-dev")
return
+ if (mail["List-Id"].matches("systemd-devel.lists.freedesktop.org")):
+ mail.move(".software.systemd-devel")
+ return
+
for subject_re in [
"\[Stow-[^\]]*\].*",
]:
@@ -179,6 +189,7 @@ def my_filters(mail):
or is_to_or_from(mail,"mitchprather@sbcglobal.net")
or is_to_or_from(mail,"oa_wap@yahoo.com")
or is_to_or_from(mail,"mytroop.us")
+ or is_to_or_from(mail,"crossroadsbsa.org")
):
mail.move(".Troop276")
return
@@ -250,20 +261,21 @@ def my_filters(mail):
# Sort mail from software people
for address in [
- "gnu.org",
- "gnome.org",
+ "@archlinux.org",
+ "@fsf.org",
+ "@github.com",
+ "canonical.org",
+ "cnuk.org",
"eff.org",
+ "esr@thyrsus.com",
+ "foocorp.net",
"gitorious.org",
- "sourceforge.com",
+ "gnome.org",
+ "gnu.org",
"ietf.org",
"kde.org",
+ "sourceforge.com",
"trustees@core3.amsl.com",
- "esr@thyrsus.com",
- "canonical.org",
- "foocorp.net",
- "cnuk.org",
- "@archlinux.org",
- "@github.com",
]:
if is_to_or_from(mail,address):
mail.move(".software")
@@ -305,6 +317,7 @@ def my_filters(mail):
or mail["Subject"].contains("newsletter")
or mail["From"].contains("Info@mailing.jamendo.com")
or mail["From"].contains("info@demandprogress.org")
+ or (mail["From"].contains("@sparkfun.com") and mail["Message-Id"].contains("rsgsv.net"))
):
mail.move(".misc.Newsletters")
return
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,
}