File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -407,16 +407,18 @@ def parse_spf_record(
407407 raise _SPFMissingRecords (
408408 f"An a mechanism points to { value .lower ()} , but that domain/subdomain does not have any A/AAAA records."
409409 )
410- for record in a_records :
410+ for i in range ( len ( a_records )) :
411411 if cidr :
412- record = f"{ record } /{ cidr } "
413- pairs = [
414- ("mechanism" , mechanism ),
415- ("value" , record ),
416- ("dns_lookups" , mechanism_dns_lookups ),
417- ("void_dns_lookups" , mechanism_void_dns_lookups ),
418- ("action" , action ),
419- ]
412+ a_records [i ] = f"{ a_records [i ]} /{ cidr } "
413+ pairs = [
414+ ("mechanism" , mechanism ),
415+ ("value" , domain ),
416+ ("addresses" , a_records ),
417+ ("dns_lookups" , mechanism_dns_lookups ),
418+ ("void_dns_lookups" , mechanism_void_dns_lookups ),
419+ ("action" , action ),
420+ ]
421+ parsed ["mechanisms" ].append (pairs )
420422
421423 elif mechanism == "mx" :
422424 mechanism_dns_lookups += 1
You can’t perform that action at this time.
0 commit comments