summaryrefslogtreecommitdiff
path: root/.config/maildirproc/att.rc
diff options
context:
space:
mode:
Diffstat (limited to '.config/maildirproc/att.rc')
-rw-r--r--.config/maildirproc/att.rc40
1 files changed, 27 insertions, 13 deletions
diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc
index 79d4469..67335e7 100644
--- a/.config/maildirproc/att.rc
+++ b/.config/maildirproc/att.rc
@@ -47,7 +47,7 @@ def majordomo_domain(mail, domain):
if m:
return m.group(1)
-def is_to_or_from(mail,address):
+def is_to_or_from(mail, address):
"""
Return true if [mail] is to or from an address that contains [address].
"""
@@ -56,7 +56,7 @@ def is_to_or_from(mail,address):
or mail["From"].contains(address)
or mail["Reply-To"].contains(address)
or mail.target.contains(address))
-def is_to_or_from_re(mail,address):
+def is_to_or_from_re(mail, address):
"""
Return true if [mail] is to or from an address that matches the
regex [address].
@@ -86,7 +86,7 @@ def bogofilter_spam(mail):
#
# The core of my filters
-def move_ham(mail,folder):
+def move_ham(mail, folder):
y = datetime.datetime.now().year
folder = "FOLDERS.Ham."+str(y)+folder
dir = processor.maildir_base+"/"+folder
@@ -157,6 +157,7 @@ def my_filters(mail):
[ 'lists.fedorahosted.org', 'fedorahosted' ],
[ 'lists.arthurdejong.org', 'arthurdejong' ],
[ 'lists.stanford.edu', 'stanford' ],
+ [ 'mailman.stanford.edu', 'stanford' ],
[ 'lists.parabola.nu', 'parabola' ],
[ 'parabola.nu', 'parabola' ] ]:
list = mailman_domain(mail, pair[0])
@@ -185,7 +186,7 @@ def my_filters(mail):
move_ham(mail, ".software.parabola")
return
# .software.POSIX
- if is_to_or_from(mail,"austin-group-l@opengroup.org"):
+ if is_to_or_from(mail, "austin-group-l@opengroup.org"):
move_ham(mail, ".software.POSIX")
return
# .software.TravisCI
@@ -215,7 +216,7 @@ def my_filters(mail):
"@sourceforge.com",
"@thyrsus.com",
]:
- if is_to_or_from(mail,address):
+ if is_to_or_from(mail, address):
move_ham(mail, ".software")
return
# .servers
@@ -243,7 +244,7 @@ def my_filters(mail):
if mail["From"].matches("@xkcd\.com"):
move_ham(mail, ".Social.xkcd")
return
- if is_to_or_from(mail,"linkedin.com"):
+ if is_to_or_from(mail, "linkedin.com"):
move_ham(mail, ".Social.LinkedIn")
return
# .BSA
@@ -274,8 +275,8 @@ def my_filters(mail):
move_ham(mail, ".BSA")
return
# .FRC
- for address in [ "@ni.com", "@usfirst.org" ]:
- if is_to_or_from(mail,address):
+ for address in [ "@ni.com", "@usfirst.org", "@firstinspires.org" ]:
+ if is_to_or_from(mail, address):
move_ham(mail, ".FRC")
return
# .FRC.829
@@ -326,21 +327,22 @@ def my_filters(mail):
if (
False
or mail["Subject"].contains("[PASE]")
- or is_to_or_from(mail,"Purduealumni@purdue.edu")
- or is_to_or_from(mail,"pase@purdue.edu")
+ or is_to_or_from(mail, "Purduealumni@purdue.edu")
+ or is_to_or_from(mail, "pase@purdue.edu")
):
move_ham(mail, ".Purdue.PASE")
return
if mail["Subject"].contains("[PLUG]"):
move_ham(mail, ".Purdue.PLUG")
return
- if is_to_or_from(mail,"@cerias.purdue.edu"):
+ if is_to_or_from(mail, "@cerias.purdue.edu"):
move_ham(mail, ".Purdue.CERIAS")
return
if (
False
- or is_to_or_from(mail,"royfu@purdue.edu")
- or is_to_or_from(mail,"usmannkhan@purdue.edu")
+ or is_to_or_from(mail, "purduehackers@gmail.com")
+ or is_to_or_from(mail, "royfu@purdue.edu")
+ or is_to_or_from(mail, "usmannkhan@purdue.edu")
):
move_ham(mail, ".Purdue.Hackers")
return
@@ -351,6 +353,17 @@ def my_filters(mail):
):
move_ham(mail, ".Purdue.CS")
return
+ if (
+ False
+ or is_to_or_from(mail, "askcco@purdue.edu")
+ or is_to_or_from_re(mail, "pmx-auto-approve\+.*@purdue\.edu")
+ or is_to_or_from(mail, "evertrue@purdue.edu")
+ or is_to_or_from(mail, "college.response@purdue.edu")
+ or is_to_or_from(mail, "purduepresident@purdue.edu")
+ or is_to_or_from(mail, "@prf.org")
+ ):
+ move_ham(mail, ".Purdue.misc")
+ return
# .misc.*
if mail["From"].matches("schwab\.com"):
move_ham(mail, ".misc.schwab")
@@ -400,6 +413,7 @@ def my_filters(mail):
or mail["From"].contains("sales@solutionsinplastic.com")
or mail["From"].contains("social@goodwillindy.org")
or mail["From"].contains("support@support.digitalocean.com")
+ or mail["From"].contains("@pardonsnowden.org")
):
move_ham(mail, ".misc.Newsletters")
return