diff --git a/pkg/analyzer/authentication_dkim.go b/pkg/analyzer/authentication_dkim.go index 9ce0dd2..9f1774b 100644 --- a/pkg/analyzer/authentication_dkim.go +++ b/pkg/analyzer/authentication_dkim.go @@ -97,13 +97,18 @@ func (a *AuthenticationAnalyzer) calculateDKIMScore(results *api.AuthenticationR // Expect at least one passing signature if results.Dkim != nil && len(*results.Dkim) > 0 { hasPass := false + hasNonPass := false for _, dkim := range *results.Dkim { if dkim.Result == api.AuthResultResultPass { hasPass = true - break + } else { + hasNonPass = true } } - if hasPass { + if hasPass && hasNonPass { + // Could be better + return 90 + } else if hasPass { return 100 } else { // Has DKIM signatures but none passed diff --git a/web/src/lib/components/AuthenticationCard.svelte b/web/src/lib/components/AuthenticationCard.svelte index 83e00ab..2db5cbe 100644 --- a/web/src/lib/components/AuthenticationCard.svelte +++ b/web/src/lib/components/AuthenticationCard.svelte @@ -147,31 +147,35 @@
{authentication.dkim[0].details}
- {/if}
+ {#if authentication.dkim && authentication.dkim.length > 0}
+ {#each authentication.dkim as dkim, i}
+ {dkim.details}
+ {/if}
+