KnowBe4
KnowBe4 DKIM and DMARC for simulated phishing emails
KnowBe4 DKIM involves your DNS only if simulated phishing is signed with your domain. Read the headers, then check SPF, DKIM and DMARC alignment.
Check your current setup:
When KnowBe4 DKIM needs your DNS
KnowBe4 DKIM needs a record in your DNS only when a simulated phishing message is signed with your own domain. Open the message's DKIM-Signature header and read the d= tag. The public key for that signature sits at selector._domainkey.example.com, under the domain named in d=. If that domain is not yours, you have nothing to publish.
Existing DMARC policy: authenticating KnowBe4 does not require resetting it. Keep one _dmarc record, preserve p, subdomain and alignment settings, and merge any needed rua address with existing destinations. The p=none example below is only for a new deployment without a valid record.
KnowBe4 sells security awareness training that includes phishing and vishing simulations. Its test emails model current attack tactics, and they only work if they reach your users. That changes the order of work. With a newsletter tool you authenticate every message on your domain. With simulated phishing you first find out which domain each test uses, and then you decide whether your records matter.
KnowBe4 has said that it uses many domains besides knowbe4.com to send its simulated phishing tests, so one lookup of the main domain tells you very little. This guide does not list KnowBe4 selectors, include: values or menu names. The KnowBe4 sources cited here do not publish these values. Ask KnowBe4 support whether your setup needs any, then use the checks below to confirm what your messages do.
Find the domains in a real simulation
A delivered test message is your best evidence, because it shows the domains that were actually used.
- Send one simulation to a test mailbox you control, and hold the wider campaign until you have read the result.
- Open the full headers of the delivered message. The Email Header Analyzer gives you a readable view.
- In
Authentication-Results, noteheader.from,smtp.mailfromandheader.d. Microsoft 365 uses these names. Other systems may label them differently. - In
DKIM-Signature, noted=ands=. Thes=tag is the DKIM selector.
Each value answers one question. header.from is the domain your staff see in the From address, which RFC 9989 calls the Author Domain. smtp.mailfrom is the envelope sender domain, the one SPF checks. header.d is the domain that signed the message with DKIM.
Which domain DMARC judges
DMARC evaluates the domain in the visible From address. The policy and the reporting address of that domain are the ones that count, so your next step depends on it.
The From domain is not yours
Your DMARC policy does not apply to the message. Each aggregate report covers one DMARC policy domain, so these messages stay out of your reports. Editing your records will not change how DMARC treats them. If delivery is the problem, the cause is in the receiving filter. Review your allow rules or see the Microsoft 365 section below.
The From domain is yours
Your DMARC policy now applies. The message passes DMARC when at least one authenticated identifier aligns with the From domain. Under relaxed alignment, the default, a domain with the same organizational domain counts. Under strict alignment the domains must be identical. Read more about DMARC alignment.
Two identifiers can do this:
- DKIM. The signature has to pass, and
d=has to align with From. A signature from another domain can pass DKIM and still do nothing for DMARC on your domain. An aligned signature needs its public key atselector._domainkey.example.com. - SPF. SPF validates the MAIL FROM domain, shown as
smtp.mailfrom. It helps DMARC only when that domain aligns with From. Ifsmtp.mailfromsits on another domain, adding entries to your SPF record changes nothing for this message.
Change your records only if the headers call for it
Use these steps only when the From domain is yours and DMARC fails because neither DKIM nor SPF aligns with From.
- Ask KnowBe4 support whether it provides a selector, key or SPF value for your account, and copy the exact value it gives you. Do not guess one.
- For DKIM, publish the record so that the key resolves at
selector._domainkey.example.com. Confirm it with the DKIM Checker, using the selector from step 1. - For SPF, add the value to your existing record. Keep one record, because two SPF records produce a
permerror. Keep the total at 10 DNS lookups or fewer, and confirm with the SPF Checker. - Send another test to the same mailbox and read the result in the headers.
Caution. A DKIM key under your domain lets whoever holds the private key sign mail that aligns with your domain. Publish only a key you asked for, and delete it when you stop using the service. An SPF entry likewise authorizes those servers to use your domain in MAIL FROM.
Before you enforce DMARC
Domain owners usually start with p=none, then read aggregate reports to confirm that nothing was missed. Publish this simple starting record as a TXT record at _dmarc.example.com:
New policy only: use this starter value only when no valid DMARC record exists. For an existing record, keep its policy and merge the report address instead of pasting over the value.
v=DMARC1; p=none; rua=mailto:dmarc@example.com
If your domain already has a DMARC record, edit it instead of adding a second one. Receivers discard all the records when they find more than one at that name.
Caution. Moving to p=quarantine or p=reject affects every message that uses your domain in From, simulations included. Move only when your reports show each legitimate sender aligned.
If your mailboxes are on Microsoft 365
Microsoft 365 has an advanced delivery policy for non-Microsoft phishing simulations. Its filters take no action on messages that match the policy, although malware filtering still applies. This is where the DKIM domain from your header helps. The policy accepts the MAIL FROM domain or the DKIM domain as specified by the phishing simulation vendor, together with at least one sending IP. A message must match at least one domain and one IP.
- Open security.microsoft.com/advanceddelivery, or go to Email & collaboration > Policies & rules > Threat policies > Advanced delivery.
- Select the Phishing simulation tab, then Add. If entries already exist, select Edit.
- Under Domain, enter the
smtp.mailfromorheader.ddomain. Under Sending IP, enter the connecting IP from the header. One test shows only the domain and IP it used. Configure every authorized domain and sending IP used by your simulations, using the complete list supplied by KnowBe4 support. The portal takes up to 50 domains and 10 IP entries, and IPv6 addresses work only through PowerShell. - Select Add (or Save, if you opened Edit in step 2), review the summary, then select Close.
Caution. Your mail may flow from the internet to Microsoft 365, through another service, and back to Microsoft 365. In that case, do not add that service's IP addresses to this policy. Microsoft warns that doing so effectively bypasses spam filtering for anyone who impersonates the listed domain.
Common problems
- DMARC fails on a domain you do not own. That result belongs to the other domain's policy. Nothing in your records changes it.
dkim=passbut DMARC fails on your domain. Thed=domain does not align with From. Compareheader.dwithheader.from.- Simulations that use your From domain stop arriving after you move to
p=reject. Receivers that apply your policy can refuse a message that fails DMARC. Before the next campaign, confirm in a test message's headers that DKIM or SPF aligns with From. - The selector looks missing. Use the exact
s=value from the header. A different selector queries a different DNS name. - Two SPF records after adding a sender. Merge them into one record and check the lookup count again.
- The Microsoft 365 policy has no effect. If your MX record does not point to Microsoft 365, the IP address in the
Authentication-resultsheader must match the policy, and you might need Enhanced Filtering for Connectors. The policy also does not apply to Direct Injection emails, because they bypass transport.