summaryrefslogtreecommitdiff
path: root/.maildirproc/default.rc
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-07-16 23:35:45 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-07-16 23:35:45 -0400
commitde5612227c7767329650c8e285d6a8973fb246cc (patch)
tree04360f475f3a3b9349a4820e85732c3a1c94a094 /.maildirproc/default.rc
parent6acab279ebfad3272170cfa523b52c8e021b811f (diff)
cleanup/improve mail filters
Diffstat (limited to '.maildirproc/default.rc')
-rw-r--r--.maildirproc/default.rc101
1 files changed, 51 insertions, 50 deletions
diff --git a/.maildirproc/default.rc b/.maildirproc/default.rc
index f49fb9b..24f51e8 100644
--- a/.maildirproc/default.rc
+++ b/.maildirproc/default.rc
@@ -71,32 +71,25 @@ def handle_incoming_unknown(mail):
return
def my_filters(mail):
- # Sort into software mailing lists
+ # Sort mail from GNU mailing lists
+ for list in [ 'bug-gsrc', 'bug-make', 'help-make', 'social', 'help-grub' ]:
+ if (
+ False
+ or mail["List-Id"].matches(list+"\.gnu\.org")
+ or mail["Subject"].contains(list)
+ ):
+ mail.move(".software."+list)
+ return
+ # Sort mail from other software mailing lists
if (
False
- or mail["List-Id"].matches("bug-gsrc\.gnu\.org")
- or mail["Subject"].contains("bug-gsrc")
+ or mail["List-Id"].matches("social-discuss\.gnu\.org")
+ or mail["Subject"].contains("social-discuss")
):
- mail.move(".software.bug-gsrc")
- return
-
- if mail["List-Id"].matches("bug-make\.gnu\.org"):
- mail.move(".software.bug-make")
- return
-
- if mail["List-Id"].matches("help-make\.gnu\.org"):
- mail.move(".software.help-make")
- return
-
- if mail["List-Id"].matches("social(|-discuss)\.gnu\.org"):
mail.move(".software.social")
return
- if mail["List-Id"].matches("help-grub.gnu.org"):
- mail.move(".software.help-grub")
- return
-
if mail["List-Id"].matches("maintenance.lists.parabolagnulinux.org"):
mail.move(".software.parabola-maintenance")
return
@@ -108,9 +101,15 @@ def my_filters(mail):
):
mail.move(".software.parabola-dev")
return
+
+ for subject_re in [
+ "\[Stow-[^\]]*\].*",
+ ]:
+ if mail["Subject"].matches(subject_re):
+ mail.move(".software")
+ return
- # Sort email from some social websites
-
+ # Sort mail from some social websites
if mail["From"].matches("facebook(|mail)\.com"):
mail.move(".Social.Facebook")
return
@@ -131,8 +130,7 @@ def my_filters(mail):
mail.move(".Social.xkcd")
return
- # Sort email related to Troop 276
-
+ # Sort mail related to Troop 276
if (
False
or mail["List-Id"].contains("troopmailinglist.troop276.net")
@@ -154,11 +152,29 @@ def my_filters(mail):
mail.move(".Troop276")
return
+ # Sort mail from misc people
if mail["From"].matches("margieshu@sbcglobal\.net"):
mail.move(".misc.Mom")
return
+
+ for address in [
+ "nintendo.com",
+ "nintendo-news.com",
+ ]:
+ if mail["From"].contains(address):
+ mail.move(".misc.Nintendo")
+ return
+
+ for address in [
+ "@lpi.org",
+ "@pearson.com",
+ "CompTIA",
+ ]:
+ if mail["From"].contains(address):
+ mail.move(".misc.CompTIA")
+ return
- # Sort mail from robotics people
+ # Sort mail from FRC people
for address in [
"jeffreysmith@msdlt.k12.in.us",
"jason.zielke@gmail.com",
@@ -171,7 +187,6 @@ def my_filters(mail):
"skiplittell@comcast.net",
"dave.nelson@ecolab.com",
"@ni.com",
- "@precisepath.com",
"@usfirst.org",
"gamefreak207@gmail.com", # Brett Leedy
"tswilson4801@att.net",
@@ -184,6 +199,7 @@ def my_filters(mail):
mail.move(".School.Robotics")
return
for subject_re in [
+ "FIRST",
"robotics",
"1024",
"kil-?a-?bytes",
@@ -192,9 +208,10 @@ def my_filters(mail):
mail.move(".School.Robotics")
return
- # Sort mail from scoftware people
+ # Sort mail from software people
for address in [
"gnu.org",
+ "eff.org",
"gitorious.org",
"sourceforge.com",
"ietf.org",
@@ -208,30 +225,9 @@ def my_filters(mail):
if is_to_or_from(mail,address):
mail.move(".software")
return
- for subject_re in [
- "\[Stow-[^\]]*\].*",
- ]:
- if mail["Subject"].matches(subject_re):
- mail.move(".software")
- return
- for address in [
- "nintendo.com",
- "nintendo-news.com",
- ]:
- if mail["From"].contains(address):
- mail.move(".Nintendo")
- return
-
- for address in [
- "@lpi.org",
- "@pearson.com",
- "CompTIA",
- ]:
- if mail["From"].contains(address):
- mail.move(".CompTIA")
- return
+ # Sort mail from the school newspaper
if (
False
or is_to_or_from(mail, "@lnnorthstar.org")
@@ -240,8 +236,13 @@ def my_filters(mail):
mail.move(".School.Newspaper")
return
+ # Sort mail from various employers/people who pay me
+ if is_to_or_from(mail, "@precisepath.com"):
+ mail.move(".Work.PrecisePath")
+ return
+
if is_to_or_from(mail,"susyphil@aol.com"):
- mail.move(".PMCH")
+ mail.move(".Work.PMCH")
for address in [
"d.farrar@comcast.net",
@@ -253,7 +254,6 @@ def my_filters(mail):
return
# Sort misc newsletters
-
if (
False
or mail["From"].contains("newsletter")
@@ -261,6 +261,7 @@ def my_filters(mail):
or mail["From"].contains("oreilly.com")
or mail["Subject"].contains("newsletter")
or mail["From"].contains("Info@mailing.jamendo.com")
+ or mail["From"].contains("info@demandprogress.org")
):
mail.move(".misc.Newsletters")
return