Your domain’s DMARC record reads something like v=DMARC1; p=none; rua=mailto:dmarc@example.com, and you want to know what that line does and how to tighten it on a cPanel server. DMARC (Domain-based Message Authentication, Reporting and Conformance) is a DNS record that tells receiving mail servers what to do with a message that claims your domain but fails both sender checks. Those checks are SPF (Sender Policy Framework, a DNS list of the servers allowed to send for your domain) and DKIM (DomainKeys Identified Mail, a signature on each message that a receiver can verify). With p=none, the answer is “do nothing special, only send me a report”: safe for deliverability, the right place to start, and no protection at all. Real protection means reading the reports, fixing every legitimate sender that fails, stepping up to p=quarantine with a pct percentage, and finishing at p=reject.
What you’ll accomplish
- Read your own
_dmarcrecord and say, tag by tag, what it asks receivers to do. - Know what happens to a failing message under
p=none,p=quarantineandp=reject, and whatpctchanges. - Turn the daily aggregate reports into a short list of sending sources that pass and fail.
- Fix the legitimate failures common on a cPanel server: the server’s own DKIM and SPF, forwarders, WordPress or WooCommerce mail, and third-party senders.
- Move to
p=quarantineand thenp=rejectwith a clear “go” test at each step.
Prerequisites
- A
_dmarcTXT record already published. Ifdig +short TXT _dmarc.example.comreturns nothing, start with Setting up SPF, DKIM, and DMARC correctly on a cPanel server and come back oncep=noneis live. - A
rua=address in that record that delivers to a mailbox you can open. Each large receiver sends one aggregate report a day to that address: a compressed XML summary of every message it saw claiming your domain. - cPanel access for the account that hosts the domain, to open Email Deliverability and the Zone Editor. If DNS is hosted elsewhere, edit the TXT record there; nothing else changes.
- Root SSH access (WHM) is optional; it is only needed for the Sender Rewriting Scheme setting and the Exim log.
- A written list of everything that sends mail as your domain, even if incomplete.
dig,gunzip,unzipandpython3are all present on a stock cPanel server.
How it works
Every receiving server runs the same test on a message that says From: someone@example.com. It checks SPF (is the sending IP allowed by the domain in the return path?) and DKIM (does the message carry a valid signature?). Then it checks alignment: the domain that passed must match the domain in the visible From: header. By default the match is relaxed, so shop.example.com and example.com count as one organisation; adkim=s or aspf=s demands an exact match. If nothing passes in alignment, the message fails DMARC and the receiver reads your p= tag. The tag is a request, not an order: RFC 7489 lets receivers deviate, and some accept failing mail even under p=reject.
The three values mean this in practice:
p=noneasks the receiver to deliver the message exactly as it would have without DMARC, and to count the failure in the next aggregate report. A forged message still lands in your customer’s inbox. This is monitoring only.p=quarantineasks the receiver to treat the failing message as suspicious. In practice that usually means the Spam or Junk folder. It is still delivered, so a mistake at this stage is recoverable.p=rejectasks the receiver to refuse the message during the SMTP conversation (SMTP is the protocol mail servers use to hand messages to each other). The sending server gets a 5xx error, a permanent failure, and the message never reaches a mailbox. For a forgery that is exactly what you want. For your own misconfigured invoice run, it is a silent outage.
Two more tags shape the move:
pct=is the share of failing messages the stated policy applies to, from 0 to 100 (default 100). RFC 7489 also defines what happens to the messagespctleaves out: underp=rejectthey are treated asquarantine, and underp=quarantinethey get the receiver’s normal handling, as undernone. Sop=quarantine; pct=25spam-folders roughly one in four failing messages and delivers the rest normally.sp=sets a separate policy for subdomains such asshop.example.comorserver1.example.com. If you leave it out, subdomains inheritp=, and they inheritrejectthe same moment you set it.
The aggregate report (the rua report) is the same under all three policies. It lists, per sending IP, how many messages the receiver saw, whether SPF and DKIM aligned, and what it did with them. That report is your evidence at every step.
Step-by-step
1. Read your current record and confirm there is exactly one.
dig +short TXT _dmarc.example.com
Example output:
"v=DMARC1; p=none; rua=mailto:dmarc@example.com"
One line is correct. Two v=DMARC1 lines make receivers ignore DMARC for the domain entirely, so delete the extra one first. If rua= points at a mailbox you cannot open, fix that in the Zone Editor and wait a day for reports to arrive.
2. Collect at least two weeks of reports and summarise them. Save the attachments from the rua mailbox into one folder; some receivers send .zip, others .xml.gz. Decompress them and run a short Python script that groups every row by sending IP and splits aligned passes from DMARC failures.
cd ~/dmarc-reports
gunzip -f *.gz 2>/dev/null
for z in *.zip; do unzip -o -q "$z"; done
python3 - <<'PY'
import glob
import xml.etree.ElementTree as ET
from collections import Counter
passing, failing = Counter(), Counter()
for path in glob.glob("*.xml"):
for rec in ET.parse(path).getroot().iter("record"):
row = rec.find("row")
ip = row.findtext("source_ip")
n = int(row.findtext("count"))
pe = row.find("policy_evaluated")
aligned = "pass" in (pe.findtext("dkim"), pe.findtext("spf"))
if aligned:
passing[ip] += n
else:
failing[(ip, pe.findtext("disposition"))] += n
print("ALIGNED PASS")
for ip, n in passing.most_common():
print(f" {n:>6} {ip}")
print("DMARC FAIL disposition")
for (ip, disp), n in failing.most_common():
print(f" {n:>6} {ip:<16} {disp}")
PY
Example output:
ALIGNED PASS
2318 203.0.113.24
411 198.51.100.9
37 192.0.2.130
DMARC FAIL disposition
58 198.51.100.77 none
13 192.0.2.201 none
4 203.0.113.24 none
The policy_evaluated fields already include alignment, so a pass there means the message would survive p=reject, and everything under DMARC FAIL is what p=reject would bounce. The disposition column reads none for now because your policy is none. Your job in step 3 is to name each of those IPs.
3. Identify every failing IP and decide whether it is yours. Reverse-resolve it and compare against your sender list.
dig +short -x 198.51.100.77
dig +short -x 192.0.2.201
Example output:
mail-out3.helpdeskvendor.net.
vps-88213.customer-hosting.example.
The first is a third-party sender you forgot (step 4d). The second is nobody you know, so a forgery or a stray script; failing is the right outcome for it. The 4 failures from 203.0.113.24, your own server, usually come from a subdomain or second site on the account sending without DKIM (step 4c).
4. Fix the legitimate sources that fail. Work through the ones that apply to you.
4a. The cPanel server itself. In cPanel, open Email » Email Deliverability. The table lists every domain with a DNS zone on the server and flags the ones whose mail records have a problem. Repair lets cPanel fix the records itself when it controls the zone; Manage shows the DKIM, SPF and DMARC sections with the suggested values. Confirm the DKIM key is really published:
dig +short TXT default._domainkey.example.com | cut -c1-80
Example output:
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq7Zt0xvR3n5sP2kL"
An empty answer means Exim is signing with a key the world cannot verify, so every message from the server fails DKIM.
4b. Forwarders. A cPanel forwarder passes your message on from its own IP, so SPF fails at the final destination and only an intact DKIM signature can save it. On your own server, turn on the Sender Rewriting Scheme (SRS), which rewrites the return path so SPF stops failing on forwarded mail. In WHM, open Service Configuration » Exim Configuration Manager » Basic Editor » Mail and set Enable Sender Rewriting Scheme (SRS) Support to On. The cases SRS cannot fix are in DMARC alignment failures caused by cPanel forwarders.
4c. WordPress and WooCommerce mail from the same account. Mail sent through PHP leaves through the local Exim, which signs it with the account’s DKIM key when the sending domain is hosted here with DKIM enabled. Order confirmations from shop@example.com therefore pass. Two things break this. A form or SMTP plugin that sets From: to the visitor’s address or another domain, so DMARC is judged against that domain. Set the From address to one at your domain and put the visitor in Reply-To. Or a site sending as noreply@shop.example.com when only example.com has a DKIM key and SPF record: that mail carries no signature and has no SPF record of its own. List what local processes actually send:
grep "P=local" /var/log/exim_mainlog | grep -o "<= [^ ]*" | sort | uniq -c | sort -rn | head -5
Example output:
912 <= shop@example.com
143 <= wordpress@example.com
4 <= noreply@shop.example.com
The third line is the subdomain case. The quickest fix is to make the plugin send from noreply@example.com. If the subdomain has its own row in Email Deliverability (it needs its own DNS zone for that), Repair gives it its own DKIM key and SPF record instead.
4d. Third-party senders. A help desk, customer relationship management (CRM) tool, newsletter service or invoicing service that sends as @example.com needs its own DKIM key for your domain. Vendors call this “domain authentication” or “custom DKIM” and give you one or two CNAME or TXT records to publish. Adding the vendor to SPF alone is not enough: most vendors put their own domain in the return path, so SPF passes without aligning.
5. Hold at p=none until the “go” test passes. After two consecutive weeks of reports that include your monthly runs (invoices, statements, newsletter), the DMARC FAIL list must contain only IPs you have identified as not yours. If a new unknown IP turns out to be yours, go back to step 4.
6. Move to p=quarantine; pct=25. In cPanel, Domains » Zone Editor » Manage, filter on _dmarc, click Edit and replace the value:
v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@example.com
Verify it published:
dig +short TXT _dmarc.example.com
Example output:
"v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@example.com"
Roughly one in four failing messages now goes to spam. Hold one to two weeks, rerun the step 2 script, and expect quarantine on about a quarter of the failing rows. Any quarantine on an IP you own is a stop sign: return to step 4, not to the next step.
7. Raise pct to 100 at quarantine. Change the record to pct=100 (a 50 stop in between is reasonable on a high-volume domain). Hold two more weeks with the same test: every failing message is now spam-foldered, and your own mail should show no quarantine dispositions.
8. Move to p=reject and set sp= on purpose. If no subdomain sends mail, sp=reject is right. If server1.example.com sends server notices, give it its own SPF and DKIM or set sp=quarantine until it has them.
v=DMARC1; p=reject; sp=reject; pct=100; rua=mailto:dmarc@example.com
Under p=reject the messages pct would leave out are quarantined, not delivered, so there is no gentle pct=25 at this stage. Only move here when quarantine at 100% has been clean for two weeks.
Validate it works
Confirm the live record from a resolver other than your own server’s:
dig @1.1.1.1 +short TXT _dmarc.example.com
Example output:
"v=DMARC1; p=reject; sp=reject; pct=100; rua=mailto:dmarc@example.com"
Then send one message from the server, with the subject test-dmarc-final, to a Gmail or Outlook.com mailbox you control. cPanel’s Exim records the subject in its log, so exigrep can pull the delivery line:
exigrep "test-dmarc-final" /var/log/exim_mainlog | grep "=>"
Example output:
2026-10-11 09:47:36 1v7Qw3-0006Hb-2c => you@gmail.com R=dkim_lookuphost T=dkim_remote_smtp H=gmail-smtp-in.l.google.com [142.250.27.26] X=TLS1.3:TLS_AES_256_GCM_SHA384:256 CV=yes C="250 2.0.0 OK 1760176056 d2e1a72fcca58-71f0c8b2a3bsi4120b3a.17 - gsmtp"
Open the received message’s headers (Gmail: Show original) and read the Authentication-Results line. The policy the receiver saw is printed inside the dmarc= result:
Authentication-Results: mx.google.com;
dkim=pass header.i=@example.com header.s=default header.b=K2fRw9pL;
spf=pass (google.com: domain of shop@example.com designates 203.0.113.24 as permitted sender) smtp.mailfrom=shop@example.com;
dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=example.com
dmarc=pass with p=REJECT is the end state. Keep running the step 2 script weekly for a month; the DMARC FAIL list should now show reject dispositions only against IPs you do not own.
Troubleshooting
A forwarded copy of your mail bounces or lands in spam after p=reject. Someone at a customer auto-forwards their mailbox to Gmail, or a mailing list appends a footer. SPF fails because the forwarder’s IP is not yours, and DKIM fails if the body changed. Receivers that check ARC (Authenticated Received Chain, which lets a trusted forwarder vouch for the original authentication) can still accept a plain forward. For a list that matters, ask its owner to enable From rewriting.
A subdomain’s mail started failing the day you set p=reject. sp= was absent, so shop.example.com inherited reject without ever being tested. Publish sp=none immediately, give the subdomain its own SPF record and DKIM key (step 4c), and move sp= up once its reports are clean.
A sender you forgot appears weeks later. Quarterly statements, an annual renewal notice, a recruiting tool used twice a year. At p=quarantine the mail is in the recipient’s spam folder and the fix is step 4d. At p=reject, drop to p=quarantine while you set up the vendor’s DKIM, then move back.
Reports stop arriving after a change. Three common causes. The rua mailbox hit its quota, so the reports bounce; check the quota bar under Email Accounts. You pointed rua= at an address on a different domain, which needs an authorisation record there: example.com._report._dmarc.reportsdomain.com with value v=DMARC1. Or the record has a typo; dig it and read it character by character.
Mail from the server itself fails. Cron output and cPanel notices are sent from user@server1.example.com. If the hostname is under your domain, that is a subdomain and your sp= applies to it. Count what the server sends on its own behalf:
grep "P=local" /var/log/exim_mainlog | grep -c "@server1.example.com"
Example output:
311
If the notices matter, publish a TXT record at server1.example.com with the value v=spf1 a -all. Those notices use the hostname in both the return path and the From: header, so an aligned SPF pass alone makes DMARC pass. If they do not matter, sp=reject is fine and receivers will start refusing them.
When this is the wrong approach
If the domain sends no mail at all (a parked brand, a redirect-only domain), skip the stages: publish v=spf1 -all and v=DMARC1; p=reject; sp=reject; rua=mailto:... today. If one sender is already bouncing, it needs an alignment fix, not a policy change. If the domain has dozens of senders across departments, reading XML by hand will not keep up. A DMARC reporting service that turns rua reports into a dashboard is then the right tool, and the “go” test stays the same. The reference for every tag is RFC 7489, and dmarc.org keeps a plain overview.
If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.