Sub topic 16
A compliance checklist for your marketing program
This chapter turns the earlier material into an audit you can run against a real sending program. It assumes you have read the chapters on SPF, DKIM, alignment, DMARC, one-click unsubscribe, and spam complaint rates. You should also be able to read raw message headers and query DNS with dig. The thresholds below reflect the published rules as of late 2026. Check each provider's current documentation before you sign off an audit, because limits and enforcement dates change.
How to run the audit
An audit has three parts: collect evidence, compare it to the requirements, and record a pass, fail, or unknown for each item. Work in the order below, because later checks depend on earlier ones. A DMARC pass means little if the DKIM signature uses the wrong domain, and complaint data means little if you cannot say which streams send to Gmail.
Step 1: Scope every sending stream
List each system that sends mail with your domain in the From address. Typical entries are the marketing platform, the transactional service, the CRM, a support desk, and any internal scripts. For each one, record:
- The From domain or subdomain it uses.
- The sending IP addresses, and whether they are shared or dedicated.
- The approximate daily volume to Gmail, Yahoo, and Outlook.com/Hotmail/Live recipients.
- Whether it sends marketing, transactional, or both.
Volume matters because each provider defines a bulk sender as one that sends roughly 5,000 or more messages a day to its personal mailboxes. Gmail counts the whole primary domain, so subdomains add up. Gmail also treats "bulk" as permanent: once you cross the line, you stay in scope. If any stream is near the line, audit it as if it were a bulk sender.
Step 2: Authentication checklist
Run these checks for each stream. The DNS commands come from the earlier chapters.
| Item | Requirement | Evidence |
|---|---|---|
| SPF | Published, one `v=spf1` record, ends in `-all` or `~all`, fewer than 10 DNS lookups | `dig +short TXT example.com` |
| DKIM | Every stream signs with your own domain, 2048-bit keys where possible | `dig +short TXT selector._domainkey.example.com` |
| DMARC | Published at `_dmarc`, at least `p=none`, with `rua` reports going to a mailbox you read | `dig +short TXT _dmarc.example.com` |
| Alignment | The visible From domain matches the SPF domain or the DKIM `d=` domain | `Authentication-Results` header on a received test message |
| PTR | Each sending IP has a reverse DNS name that resolves back to that IP | `dig +short -x 203.0.113.25` |
| TLS | Outbound SMTP uses TLS where the receiver offers it | Server logs or a `Received` header showing `ESMTPS` |
| Format | Valid RFC 5322 message with a proper `From`, `Date`, and `Message-ID` | Raw message source |
The most common failure here is alignment. A message can show spf=pass and dkim=pass and still fail DMARC when neither domain matches the From domain. The sample header from the earlier chapter shows the safe pattern: SPF passes for bounce.example.com, which does not align, but DKIM passes for example.com, which does. DMARC passes through DKIM alone. For that reason, treat DKIM alignment as the primary control and SPF alignment as a backup.
You can script the DNS half of this table. The following script uses the dnspython package (pip install dnspython). It checks that the three records exist and flags a few common mistakes.
import sys
import dns.resolver
def txt(name):
try:
answers = dns.resolver.resolve(name, "TXT")
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
return []
return [b"".join(r.strings).decode() for r in answers]
def audit(domain, selector):
findings = []
spf = [t for t in txt(domain) if t.startswith("v=spf1")]
if len(spf) != 1:
findings.append(f"FAIL SPF: expected 1 record, found {len(spf)}")
elif not spf[0].rstrip().endswith(("-all", "~all")):
findings.append("WARN SPF: record does not end in -all or ~all")
else:
findings.append("PASS SPF")
dkim = txt(f"{selector}._domainkey.{domain}")
if any("p=" in t for t in dkim):
findings.append("PASS DKIM key published")
else:
findings.append(f"FAIL DKIM: no key at {selector}._domainkey.{domain}")
dmarc = [t for t in txt(f"_dmarc.{domain}") if t.startswith("v=DMARC1")]
if not dmarc:
findings.append("FAIL DMARC: no record")
else:
findings.append("PASS DMARC")
if "rua=" not in dmarc[0]:
findings.append("WARN DMARC: no rua reporting address")
return findings
if __name__ == "__main__":
domain, selector = sys.argv[1], sys.argv[2]
for line in audit(domain, selector):
print(line)Run it with python audit.py example.com mail1. It cannot check alignment, because alignment is a property of a real message. Pair it with a test message sent through each stream.
Step 3: Message and unsubscribe checklist
Send a real test message from each marketing stream to a Gmail account you control, then use "Show original" to inspect it. Confirm the following:
Authentication-Resultsshowsdmarc=passfor the From domain.- The message has both
List-UnsubscribeandList-Unsubscribe-Post: List-Unsubscribe=One-Click. - Both unsubscribe headers appear in the DKIM
h=list, so the signature covers them. - The unsubscribe URL accepts a
POSTand does not require login, a confirmation page, or a captcha. - The visible footer also contains a human-readable unsubscribe link.
Then test the endpoint itself. Send a POST with the body List-Unsubscribe=One-Click and confirm that the test address is suppressed. Check that the next scheduled send skips it. Providers expect the opt-out to take effect within two days, so measure the real delay in your pipeline, including any batch jobs that sync suppression lists.
Step 4: List practices checklist
Authentication proves who sent the mail. List practices decide whether recipients want it. Check these items:
- Every address has a recorded source and consent date.
- Hard bounces and repeated soft bounces are suppressed automatically.
- Unsubscribes and spam complaints (from feedback loops where available) are suppressed across all streams, not just the stream that generated them.
- Addresses with no opens or clicks for a set period, such as 6 to 12 months, are re-confirmed or retired.
- No purchased, rented, or scraped lists are in use.
- Sign-up forms are protected against bots that submit other people's addresses.
Step 5: Reputation and thresholds
Add your sending domain to Google Postmaster Tools and review the spam rate chart. The published targets are a spam complaint rate below 0.10%, and never reaching 0.30%. Yahoo uses the 0.30% ceiling as well, and Microsoft also names 0.30% as a level to stay under. Treat 0.10% as your internal alert line, so you have room to act before the hard limit.
Postmaster Tools only reports on traffic that has enough volume and passes DKIM or SPF authentication. A blank chart is not proof of a clean program. For Yahoo and Microsoft, use their complaint feedback loop and sender support programs where you are eligible, and compare complaint data from your ESP's dashboards.
Step 6: Provider differences to check
The three providers share the same core, but the details differ, so record a separate result for each.
| Check | Gmail | Yahoo | Microsoft (Outlook.com, Hotmail, Live) |
|---|---|---|---|
| Scope | About 5,000+ messages a day, permanent once reached | About 5,000+ messages a day | About 5,000+ messages a day |
| Authentication | SPF, DKIM, DMARC | SPF, DKIM, DMARC | SPF, DKIM, DMARC with alignment |
| One-click unsubscribe | Required for marketing | Required for marketing | Recommended, with a clear unsubscribe mechanism |
| Complaint ceiling | 0.30% | 0.30% | 0.30% |
| Typical failure response | Temporary deferrals, then rejections such as `550 5.7.26` | Deferrals and rejections | Junk placement, then rejection such as `550 5.7.515` |
Where a provider's rule is weaker than the others, still follow the strictest one. A single configuration that satisfies Gmail also satisfies the other two.
Recording the result
For each stream, produce a short table of item, status, evidence, owner, and due date. Mark an item "unknown" when you cannot produce evidence, and treat unknown as a fail until you can. Re-run the audit after any change to DNS, an ESP migration, a new sending stream, or a complaint rate above your internal 0.10% line.
Exercise
Your DNS audit script reports PASS for SPF, DKIM, and DMARC on example.com, but a Gmail test message shows dmarc=fail. The header shows spf=pass smtp.mailfrom=esp-bounce.net and dkim=pass header.d=esp-signing.net. What is wrong, and what is the fix?
Show answer
SPF and DKIM both pass, but for domains that differ from the From domain (example.com), so neither is aligned and DMARC fails. The script only checks that records exist, not alignment. The fix is to configure the ESP to sign with your own domain, so that DKIM shows header.d=example.com. You do this by publishing the ESP's DKIM selector records under your domain. Optionally, set up a custom return-path subdomain so SPF aligns too. Then resend a test message and confirm dmarc=pass.
Exercise
Postmaster Tools shows a spam rate of 0.18% for your newsletter domain. Is the program compliant, and what should you do?
Show answer
It is under the 0.30% limit, but above the 0.10% target, so you are at risk and should act now. Review recent campaigns for the ones that drew complaints, tighten the audience to engaged and consented recipients, make the unsubscribe link easy to find, and confirm that suppression of complainers works across streams. Track the rate daily until it falls back below 0.10%.