Description | This article describes how to configure FortiMail to perform DMARC alignment scanning (i.e. checking SPF and DKIM alignment w.r.t the Header‑From domain) and how to interpret the resulting logs (e.g. 'DMARC SPF alignment check failed …', 'DKIM header aligned …'). |
Scope | FortiMail v7.0 and above. |
Solution |
Background: What is DMARC Alignment Scan. DMARC (Domain-based Message Authentication, Reporting, and Conformance) requires not only that SPF or DKIM pass, but also that the authenticated domain is aligned with the domain in the From: header (RFC 5322).
A 'DMARC alignment scan' refers to the process by which FortiMail applies these alignment checks and logs / acts upon the results.
Configuration Steps: Below are steps to enable DMARC alignment scanning in FortiMail.
config antispam profile
This ensures FortiMail evaluates SPF, DKIM, and applies alignment logic to incoming emails.
config antispam profile
Depending on version, configure which alignment checks to enforce (e.g. header vs envelope, header vs reply-to).
For example (in 7.x):
config antispam settings
By default, FortiMail may follow p= policy in DNS, or FortiMail can override it to use the profile-defined action:
This forces FortiMail to enforce the action defined in the antispam profile whenever DMARC alignment fails.
In newer GUI versions, this setting might be under Security -> Options -> Preference or within the Antispam profile’s DMARC section.
Example Log Messages & Interpretation: Once DMARC alignment scan is active, the DMARC logs in FortiMail will be as below:
These logs helps trace which component (SPF or DKIM) failed alignment, which aids in troubleshooting SPF records, DKIM configurations, or envelope rewriting |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.