Improve authentication results

This commit is contained in:
nemunaire 2025-10-22 12:26:46 +07:00
commit a2e2e78831
3 changed files with 54 additions and 15 deletions

View file

@ -153,14 +153,7 @@ func (a *AuthenticationAnalyzer) parseSPFResult(part string) *api.AuthResult {
}
}
// Extract details
if idx := strings.Index(part, "("); idx != -1 {
endIdx := strings.Index(part[idx:], ")")
if endIdx != -1 {
details := strings.TrimSpace(part[idx+1 : idx+endIdx])
result.Details = &details
}
}
result.Details = api.PtrTo(strings.TrimPrefix(part, "spf="))
return result
}