summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-04-11 20:49:41 +0000
committerbwarsaw2002-04-11 20:49:41 +0000
commit83267288f5c8a008668d4b52cfcf547ceaa5e8e0 (patch)
tree5c287a16d9970980ffce54e047abb29700d4a3ab
parentfb07d17bc976ccb8d758562838df28167330ecf5 (diff)
downloadmailman-83267288f5c8a008668d4b52cfcf547ceaa5e8e0.tar.gz
mailman-83267288f5c8a008668d4b52cfcf547ceaa5e8e0.tar.zst
mailman-83267288f5c8a008668d4b52cfcf547ceaa5e8e0.zip
Liberalize some of these tests so international Yahoo! accounts are
still caught. Inspired by SF patch # 538983 by David Abrahams.
-rw-r--r--Mailman/Bouncers/Yahoo.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Mailman/Bouncers/Yahoo.py b/Mailman/Bouncers/Yahoo.py
index 853c68e5d..fd952915c 100644
--- a/Mailman/Bouncers/Yahoo.py
+++ b/Mailman/Bouncers/Yahoo.py
@@ -18,8 +18,9 @@
import re
import email
+from email.Utils import parseaddr
-tcre = re.compile(r'message\s+from\s+yahoo.com', re.IGNORECASE)
+tcre = re.compile(r'message\s+from\s+yahoo\.\S+', re.IGNORECASE)
acre = re.compile(r'<(?P<addr>[^>]*)>:')
ecre = re.compile(r'--- Original message follows')
@@ -28,7 +29,8 @@ ecre = re.compile(r'--- Original message follows')
def process(msg):
# Yahoo! bounces seem to have a known subject value and something called
# an x-uidl: header, the value of which seems unimportant.
- if msg.get('from', '').lower() <> 'mailer-daemon@yahoo.com':
+ sender = parseaddr(msg.get('from', '').lower())[1] or ''
+ if not sender.startswith('mailer-daemon@yahoo'):
return None
addrs = []
# simple state machine