Skip to content
Snippets Groups Projects
Commit 157f33ed authored by Stuart Gathman's avatar Stuart Gathman
Browse files

Permerror for multiple TXT SPF records.

parent 64bf954a
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,9 @@ For news, bugfixes, etc. visit the home page for this implementation at ...@@ -48,6 +48,9 @@ For news, bugfixes, etc. visit the home page for this implementation at
# Terrence is not responding to email. # Terrence is not responding to email.
# #
# $Log$ # $Log$
# Revision 1.24 2006/07/28 01:21:33 customdesigned
# Remove debug print
#
# Revision 1.23 2006/07/28 01:21:02 customdesigned # Revision 1.23 2006/07/28 01:21:02 customdesigned
# More fixes from pyspf # More fixes from pyspf
# #
...@@ -922,6 +925,8 @@ class query(object): ...@@ -922,6 +925,8 @@ class query(object):
""" """
# for performance, check for most common case of TXT first # for performance, check for most common case of TXT first
a = [t for t in self.dns_txt(domain) if isSPF(t)] a = [t for t in self.dns_txt(domain) if isSPF(t)]
if len(a) > 1:
raise PermError('Two or more type TXT spf records found.')
if len(a) == 1 and self.strict < 2: if len(a) == 1 and self.strict < 2:
return a[0] return a[0]
# check official SPF type first when it becomes more popular # check official SPF type first when it becomes more popular
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment