An email may pass SPF or DKIM checks while still using a visible sender domain that differs from the one that was authenticated. This is a limitation of both mechanisms when used independently, and it can facilitate certain types of identity spoofing.
The Domain-based Message Authentication, Reporting and Conformance (DMARC) standard addresses this issue by introducing an additional requirement: verifying that the domain authenticated via SPF or DKIM is aligned with the domain appearing in the message's From field.
Furthermore, DMARC allows domain owners to publish policies regarding how emails that fail these checks should be handled, providing greater control over the use of their domains.
Domain Alignment as a Key Element
DMARC uses the results from SPF and DKIM, but it introduces a specific condition for a message to be considered as having passed its validation.
To achieve a successful result, at least one of the two mechanisms must pass its own check, and the authenticated domain must be aligned with the sender's visible domain.
This alignment can be established in two ways:
- Relaxed: allows domains to belong to the same organizational domain, even if they use different subdomains.
- Strict: requires an exact match between the domains.
For example, a message sent from notificaciones.ejemplo.es may pass the relaxed alignment check with respect to ejemplo.es, but not the strict one, provided that the domains meet the conditions established by the standard.
This mechanism makes it possible to detect situations where an email passes SPF or DKIM checks while using a domain different from the one presented to the recipient.
From Monitoring to Rejecting Messages
One of the key capabilities of DMARC is allowing organizations to define how receiving servers should handle messages that fail validation.
These policies are published via DNS records and offer three options:
- p=none: requests that no specific DMARC rejection or quarantine measures be applied. This is useful during the monitoring and analysis phases.
- p=quarantine: requests that messages failing DMARC be quarantined, for example, by being classified as spam.
- p=reject: requests that receiving servers reject messages that fail validation.
Example of a DMARC record in DNS
An illustrative example of a DMARC policy configured to request the rejection of messages that fail validation.
In this example, the domain ejemplo.es publishes a "p=reject" policy, instructing receiving servers to reject any messages that fail DMARC validation. The "rua" parameter specifies the address to which aggregate authentication reports can be sent, facilitating the monitoring of results.
The transition between these policies should be managed in a controlled manner. Applying a "reject" policy directly, without first identifying all legitimate sending sources, can cause disruptions to corporate communications.
Therefore, it is standard practice to begin with a monitoring policy, analyze the authentication results, and then progressively move toward more restrictive measures.
A policy that requires an understanding of email infrastructure
Implementing DMARC requires a precise overview of the services that send messages using an organization’s domains.
External platforms, corporate applications, and automated systems may use different SPF and DKIM configurations. If these do not ensure the required alignment, messages may fail DMARC checks, even when they originate from legitimate sources.
Furthermore, it is advisable to review how subdomains are handled and the alignment modes in place, particularly in organizations with distributed email infrastructures.
Publishing a DMARC policy does not guarantee that all receiving servers will apply it in the same way, as the final handling of messages depends on each server’s own policies and security mechanisms.
DMARC enables a shift from authenticating individual messages to a protection policy tied to the sender’s visible domain. Its effectiveness relies on a combination of proper alignment, progressive enforcement policies, and an up-to-date understanding of legitimate sending sources.