# My transactional emails land in spam. What do SPF, DKIM and DMARC need to say?

Source: https://gitshowcase.com/forum/discuss/my-transactional-emails-land-in-spam-what-do-spf-dkim-and-dmarc-need/
Site: GitShowcase Forum, category Payment, Email and SMS APIs
Published: 2026-11-18. Updated: 2026-11-18. Replies: 0.

## Question by Maren Castillo (staff), 2026-11-18

Publish one SPF record that lists your sending service, turn on DKIM signing for your own domain, and add a DMARC record starting at `p=none` with a reporting address. Then make sure the domain in the visible From address lines up with the SPF or DKIM domain. Misaligned domains are the most common reason.

## What each record does

- **SPF** (Sender Policy Framework) is a DNS record listing which servers may send mail for a domain. Yahoo's sender guidance describes it as the list of IPs allowed to send for that domain.
- **DKIM** (DomainKeys Identified Mail) adds a cryptographic signature to each message. The receiver checks it against a public key in your DNS, which shows the message was not altered and ties it to the signing domain.
- **DMARC** (Domain-based Message Authentication, Reporting and Conformance) sits on top. Per [RFC 7489](https://www.rfc-editor.org/rfc/rfc7489.html), it tells receivers what to do when a message fails, and it requires alignment: the domain in the visible From address must match the domain that passed SPF or DKIM. One aligned pass is enough.

Passing SPF on some other domain does not help if the From address shows yours. That mismatch is why mail from a "properly configured" service still lands in spam.

## Check first

1. Open one spam copy, choose "Show original" or "View source", and read the `Authentication-Results` header. Note whether spf, dkim and dmarc say pass, fail or none, and which domains they name.
2. Look up your current records:

```bash
dig +short TXT example.com
dig +short TXT _dmarc.example.com
dig +short TXT selector1._domainkey.example.com
```

Replace `example.com` and the selector with your domain and the selector your email provider gave you.
3. Find out which domain your provider uses in the envelope sender (Return-Path) and in the DKIM `d=` value. If both are the provider's domain rather than yours, DMARC alignment fails.

## Step 1: SPF, one record only

Add a TXT record at your domain root. The include value comes from your email provider's setup page:

```text
v=spf1 include:<PROVIDER_SPF_DOMAIN> ~all
```

Two traps, both from [RFC 7208](https://www.rfc-editor.org/rfc/rfc7208.html):

- A domain must publish a single SPF record. If evaluation finds more than one, the result is a permanent error, so merge them into one line rather than adding a second.
- SPF evaluation limits the number of terms that trigger DNS lookups to 10, and exceeding it also returns a permanent error. Stacking many `include:` entries from marketing tools, a helpdesk and a transactional service can hit this. Remove senders you no longer use.

## Step 2: DKIM on your own domain

In your email provider's dashboard, add your sending domain and copy the DNS records it gives you, usually CNAME or TXT records under a `_domainkey` name. Wait for it to show verified, then send a test and confirm `dkim=pass` with `d=` equal to your domain or a subdomain of it. Yahoo's guidance asks for a minimum 1024-bit key length; most providers generate a suitable key for you.

## Step 3: DMARC, start in monitoring

```text
_dmarc.example.com   TXT   "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"
```

`p=none` asks receivers to take no action on failures, so it is safe while you learn what sends as your domain. `rua` is where aggregate reports go. RFC 7489 defines the policies:

| `p=` value | Meaning |
| --- | --- |
| `none` | No specific action requested |
| `quarantine` | Treat failures as suspicious, which can mean the spam folder |
| `reject` | Ask receivers to reject failing mail |

The policy applies to subdomains too, unless you set an `sp` tag. Alignment is relaxed by default (`adkim` defaults to `r`), which lets a subdomain like `mail.example.com` align with `example.com`. After the reports show every legitimate sender passing with alignment, move to `quarantine`, then `reject`.

## Step 4: Use a subdomain for transactional mail

Yahoo's sender guidance recommends separating mail types, so bulk or marketing sending does not share reputation with user, transactional and alert mail. A common setup is `mail.example.com` or `notify.example.com` for receipts and password resets, with its own SPF and DKIM, and marketing on a different subdomain.

## What the big mailbox providers want

As of Yahoo's sender requirements in November 2026, bulk senders must implement both SPF and DKIM, publish a DMARC policy of at least `p=none` that passes, keep the spam complaint rate below 0.3%, and support one click unsubscribe for marketing mail (a `List-Unsubscribe` header, with the POST method described in RFC 8058 highly recommended). All senders need valid forward and reverse DNS on sending IPs. Pure receipts and resets are not marketing, but a provider's definition of "bulk" is theirs, so authenticate everything the same way.

## If authentication passes and mail is still in spam

- Content problems: a link shortener, a mismatched link domain, or an image only message.
- A cold domain sending a sudden large volume. Ramp up gradually.
- Old or invalid addresses producing bounces, which hurt reputation. Remove hard bounces promptly.

Provider choice matters less than these records; the [email API guide](https://gitshowcase.com/best/email-apis/) compares the services.

---
Cite as: GitShowcase Forum, "My transactional emails land in spam. What do SPF, DKIM and DMARC need to say?", https://gitshowcase.com/forum/discuss/my-transactional-emails-land-in-spam-what-do-spf-dkim-and-dmarc-need/, accessed 2026-11-18.
