Skip to content

Commit

Permalink
Fix #1336 - Count include/redirect in SPF for DNS lookup limit
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Apr 4, 2024
1 parent 5b7dfc6 commit 18ad25f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions checks/tasks/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,10 @@ def spf_check_policy(domain, spf_record, task, policy_records, max_lookups=10, i
log.debug("Reducing max lookups per term: %s" % term)
if term.startswith("redirect"):
redirect_terms.append(term)
left_lookups -= 1
elif "include:" in term:
terms.append(term)
left_lookups -= 1
elif "mx" in term:
log.debug("mx found in term, reducing left_lookups with 1")
left_lookups -= 1
Expand Down

0 comments on commit 18ad25f

Please sign in to comment.