Skip to content

Commit

Permalink
DNS lookup limit being hit too early during SPF verification (closes #35
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mdecimus committed Jun 19, 2024
1 parent fd6b5f7 commit db3591e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/spf/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,12 @@ impl Resolver {
.await
{
Ok(records) => {
for exchange in records.iter().flat_map(|mx| mx.exchanges.iter()) {
if !lookup_limit.can_lookup() {
for (mx_num, exchange) in records
.iter()
.flat_map(|mx| mx.exchanges.iter())
.enumerate()
{
if mx_num > 9 {
return output
.with_result(SpfResult::PermError)
.with_report(&spf_record);
Expand Down

0 comments on commit db3591e

Please sign in to comment.