From d119af1a3e92fd4862de215fb025b3f86c5fd88f Mon Sep 17 00:00:00 2001 From: Stuart Gathman Date: Fri, 12 Aug 2005 17:36:51 +0000 Subject: [PATCH] Trean non-existant include as no match in "lax" mode. --- spf.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/spf.py b/spf.py index eb5edaa..ddbc6a1 100755 --- a/spf.py +++ b/spf.py @@ -47,6 +47,9 @@ For news, bugfixes, etc. visit the home page for this implementation at # Terrence is not responding to email. # # $Log$ +# Revision 1.13 2005/07/22 16:00:23 customdesigned +# Limit CNAME chains independently of DNS lookup limit +# # Revision 1.31 2005/07/22 02:11:50 customdesigned # Use dictionary to check for CNAME loops. Check limit independently for # each top level name, just like for PTR. @@ -632,9 +635,15 @@ class query(object): if res == 'pass': break if res == 'none': - raise PermError( - 'No valid SPF record for included domain: %s'%arg, - mech) + try: + if self.strict or not self.perm_error: + raise PermError( + 'No valid SPF record for included domain: %s'%arg, + mech) + except PermError,x: + if self.strict: + raise x + self.perm_error = x continue elif m == 'all': break