summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-07-19 19:26:23 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-07-19 19:28:59 -0600
commit83431d32040061990874bebd6150eeab80aa0322 (patch)
tree5f92dd74a2658d896cbb6e5658ca45a16fc28b95
parentf58b1d0d6467ee0e0fe460cbc51b507b6ca404f5 (diff)
mail filters
-rw-r--r--.config/maildirproc/att.rc5
1 files changed, 3 insertions, 2 deletions
diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc
index 43cec78..792b42c 100644
--- a/.config/maildirproc/att.rc
+++ b/.config/maildirproc/att.rc
@@ -13,14 +13,14 @@ def mailman_domain(mail, domain):
"""
Return a string that is the list-name for a mailman domain
"""
- m = mail["List-Id"].matches("(.*<)?([^<]*)\."+re.escape(domain))
+ m = mail["List-Id"].matches("^(.*<|)([^<]*)\."+re.escape(domain))
if m:
return m.group(2)
for hdr in [ 'To', 'Cc', 'From' ]:
m = mail[hdr].matches("((\w|-)*)@"+re.escape(domain))
if m:
if mail["Subject"].contains("["+m.group(1)+"]"):
- return m.group(2)
+ return m.group(1)
return None
def is_to_or_from(mail,address):
@@ -96,6 +96,7 @@ def handle_incoming_unknown(mail):
or mail["From"].contains("@gandi.net")
or mail["From"].contains("@github.com>")
or mail["From"].contains("@goodwillindy.org>")
+ or mail["From"].contains("@kickstarter.com>")
or mail["From"].contains("@lpi.org>")
or mail["From"].contains("@msdlt.k12.in.us>")
or mail["From"].contains("@parabola.nu")