Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymilter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
misc
pymilter
Commits
157f33ed
Commit
157f33ed
authored
18 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Permerror for multiple TXT SPF records.
parent
64bf954a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
spf.py
+5
-0
5 additions, 0 deletions
spf.py
with
5 additions
and
0 deletions
spf.py
+
5
−
0
View file @
157f33ed
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment