[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r19843: {projects} workaround the fact that our dkim py thinks that yahoo.com a (projects/gettor)



Author: arma
Date: 2009-06-26 02:10:42 -0400 (Fri, 26 Jun 2009)
New Revision: 19843

Modified:
   projects/gettor/GetTor.py
Log:
workaround the fact that our dkim py thinks that yahoo.com and
yahoo.cn always produce failed dkim headers.


Modified: projects/gettor/GetTor.py
===================================================================
--- projects/gettor/GetTor.py	2009-06-26 06:02:50 UTC (rev 19842)
+++ projects/gettor/GetTor.py	2009-06-26 06:10:42 UTC (rev 19843)
@@ -59,6 +59,7 @@
 import os
 import subprocess
 import gettext
+import re
 import gettor.blacklist
 import gettor.requests
 import gettor.responses
@@ -198,7 +199,9 @@
     signature = rmail.hasVerifiedSignature()
     log.info(_("Signature is: %s") % str(signature))
     # Addresses from whitelist can pass without DKIM signature
-    if not signature and not whiteList.lookupListEntry(replyTo):
+## XXX Hack below while yahoo.cn and yahoo.com have dkim headers that
+## our dkim py thinks always fail. -RD
+    if not signature and not whiteList.lookupListEntry(replyTo) and not re.compile(".*@yahoo.com.cn").match(replyTo) and not re.compile(".*@yahoo.cn").match(replyTo) and not re.compile(".*@gmail.com").match(replyTo):
         # Check to see if we've helped them to understand that they need DKIM
         # in the past
         previouslyHelped = blackList.lookupListEntry(replyTo)