# dmarc alignment failed spf pass dkim fail error

## TL;DR
DMARC needs SPF or DKIM to pass AND align with the From domain, so a passing SPF for the wrong domain does not count. Check the aggregate report to see which mechanism failed, ensure the sending service DKIM-signs with the From domain, or align SPF so the envelope sender matches. Send a test and confirm DMARC passes.

```text
dmarc alignment failed spf pass dkim fail error
```

## Use this when

- DMARC reports show failures with SPF pass and DKIM fail
- Mail fails DMARC despite SPF being valid
- The failure started after changing email service providers

## Not for this skill when

- DMARC record syntax errors (fix the policy record)
- Receivers that do not check DMARC at all (nothing to fix)
- SPF hard failures on their own (fix SPF first)

## Steps

### Step 1: Read the aggregate report

Open the DMARC aggregate report and find the failing source: which IP, which SPF result, which DKIM result. Expected: you know exactly which mechanism failed alignment.

### Step 2: Verify DKIM signing

Confirm the sending service actually DKIM-signs outbound mail and that the DKIM DNS records exist. Expected: signed mail with a d value matching the From domain.

### Step 3: Fix DKIM alignment

Enable DKIM in the sending service's settings and publish its DKIM records, ensuring the signing domain matches the From domain. Expected: DKIM passes and aligns.

### Step 4: Or align SPF

Alternatively, make the envelope-from domain match the From domain so SPF aligns. Expected: SPF passes and aligns as the backup mechanism.

### Step 5: Send a test and confirm

Send to a seed address and check authentication results. Expected: DMARC shows pass.

## Tool compatibility

DMARC aggregate reports; DKIM DNS records and signing; SPF and envelope-from alignment.

## Variant phrasings

### Variant 1

dmarc fail spf pass dkim fail alignment

### Variant 2

dmarc alignment failed how to fix dkim

### Variant 3

spf passes but dmarc fails dkim alignment

## Why it happens

DMARC's rule is stricter than it first appears: it is not enough for SPF or DKIM to pass, one of them must pass for the right domain, the domain in the visible From header. Forwarding breaks SPF while leaving DKIM intact, which is why the classic failure is SPF passing for the forwarder's domain while DKIM fails or is absent: nothing aligns with the From domain, so DMARC fails. The fix is almost always DKIM, because DKIM signatures survive forwarding. Teams chase SPF because its pass looks reassuring in the report, but a passing unaligned SPF contributes nothing to DMARC.

## Edge cases / pitfalls

- Mailing lists and forwards rewrite envelopes; DKIM is the mechanism that survives them.
- Subdomains need their own alignment consideration under the organizational domain policy.
- A p=reject policy makes these failures destructive; start with p=none while fixing alignment.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_Avx-zlhFbmgWkE4OnLPtIw
