Header Analysis {#if headerScore !== undefined} {headerScore}% {/if} {#if headerGrade !== undefined} {/if}

{#if headerAnalysis.issues && headerAnalysis.issues.length > 0}
Issues
{#each headerAnalysis.issues as issue}
{issue.header}
{issue.message}
{#if issue.advice}
{issue.advice}
{/if}
{issue.severity}
{/each}
{/if} {#if headerAnalysis.domain_alignment}
Domain Alignment

Domain alignment ensures that the visible "From" domain matches the domain used for authentication (Return-Path). Proper alignment is crucial for DMARC compliance and helps prevent email spoofing by verifying that the sender domain is consistent across all authentication layers.

Strict Alignment
{headerAnalysis.domain_alignment.aligned ? 'Pass' : 'Fail'}
Exact domain match
Relaxed Alignment
{headerAnalysis.domain_alignment.relaxed_aligned ? 'Pass' : 'Fail'}
Organizational domain match
From Domain
{headerAnalysis.domain_alignment.from_domain || '-'}
{#if headerAnalysis.domain_alignment.from_org_domain && headerAnalysis.domain_alignment.from_org_domain !== headerAnalysis.domain_alignment.from_domain}
Org: {headerAnalysis.domain_alignment.from_org_domain}
{/if}
Return-Path Domain
{headerAnalysis.domain_alignment.return_path_domain || '-'}
{#if headerAnalysis.domain_alignment.return_path_org_domain && headerAnalysis.domain_alignment.return_path_org_domain !== headerAnalysis.domain_alignment.return_path_domain}
Org: {headerAnalysis.domain_alignment.return_path_org_domain}
{/if}
{#if headerAnalysis.domain_alignment.issues && headerAnalysis.domain_alignment.issues.length > 0}
{#each headerAnalysis.domain_alignment.issues as issue}
{issue}
{/each}
{/if} {#if dmarcRecord && headerAnalysis.domain_alignment.return_path_domain && headerAnalysis.domain_alignment.return_path_domain !== headerAnalysis.domain_alignment.from_domain}
{#if dmarcRecord.spf_alignment === 'strict'} Strict SPF alignment required — Your DMARC policy requires exact domain match. The Return-Path domain must exactly match the From domain for SPF to pass DMARC alignment. {:else} Relaxed SPF alignment allowed — Your DMARC policy allows organizational domain matching. As long as both domains share the same organizational domain (e.g., mail.example.com and example.com), SPF alignment can pass. {/if}
{/if}
{/if} {#if headerAnalysis.headers && Object.keys(headerAnalysis.headers).length > 0}
Headers
{#each Object.entries(headerAnalysis.headers).sort((a, b) => { const importanceOrder = { 'required': 0, 'recommended': 1, 'optional': 2, 'newsletter': 3 }; const aImportance = importanceOrder[a[1].importance || 'optional']; const bImportance = importanceOrder[b[1].importance || 'optional']; return aImportance - bImportance; }) as [name, check]} {/each}
When? Present Valid Value
{name} {#if check.importance} {check.importance} {/if} {#if check.present && check.valid !== undefined} {:else} - {/if} {check.value || '-'} {#if check.issues && check.issues.length > 0} {#each check.issues as issue}
{issue}
{/each} {/if}
{/if}