Introduction
To make DMARC work with Mimecast as an email gateway, you need two things for outbound mail and one for inbound. Outbound, add Mimecast's regional SPF include and have Mimecast DKIM-sign with your own domain. Inbound, enable DMARC verification in Mimecast and fix how the mailbox platform behind it, such as Microsoft 365, reads authentication results.
This guide covers Mimecast as a secure email gateway (SEG), inbound and outbound. It does not cover any Mimecast reporting product. For the general picture of how gateways interact with authentication, start with how secure email gateways affect DMARC, SPF and DKIM. The wider context is in the DMARC guide.
Key takeaways
- Outbound mail relayed through Mimecast needs the Mimecast include for the account's region in SPF, listed once. Check the exact value in Mimecast's own documentation.
- Configure a "DNS Authentication – Outbound Signing" definition so Mimecast signs with a selector under your domain. That signature is what keeps DMARC passing when mail is modified or forwarded.
- With MX pointing to Mimecast in front of Microsoft 365 or Google Workspace, the mailbox platform sees Mimecast's IP addresses, not the real sender. Fix it with Enhanced Filtering for Connectors and, where messages are modified, trusted ARC sealers.
- Allow lists and Permitted Senders policies can bypass checks. Set DMARC "Fail" to "Honor DMARC Record" and keep bypass entries narrow.
How do I set up SPF for outbound mail through Mimecast?
Add the single Mimecast include for your account's region to the domain's SPF record, alongside your other senders. Mimecast publishes separate includes per region, plus a global one, and recommends referencing Mimecast only once. Check your region's value in Mimecast's Implementing SPF for Outbound Email article.
At the time of writing, Mimecast's support article listed these includes:
| Mimecast region | SPF include |
|---|---|
| Europe (excluding Germany) | include:eu._netblocks.mimecast.com |
| Germany | include:de._netblocks.mimecast.com |
| United States | include:us._netblocks.mimecast.com |
| Canada | include:ca._netblocks.mimecast.com |
| South Africa | include:za._netblocks.mimecast.com |
| Australia | include:au._netblocks.mimecast.com |
| Global (all regions except USB) | include:_netblocks.mimecast.com |
A UK client on the European grid, sending all external mail through Mimecast, might publish:
example.co.uk TXT "v=spf1 include:eu._netblocks.mimecast.com ~all"
Mimecast's documentation also makes three points worth applying to every client:
- List Mimecast first and remove any older Mimecast entries, so there is exactly one reference.
- Remove the
mxmechanism if MX records point to Mimecast. It adds lookups and can push the record over the limit of 10 DNS lookups in RFC 7208. - Test with
~allbefore-all. Mimecast recommends starting relaxed. For DMARC, the qualifier matters less than alignment; see SPF softfail vs hardfail with DMARC.
Only add the Mimecast include if mail actually leaves through Mimecast. Microsoft's guidance for a third-party filter that handles inbound only is to keep the standard Microsoft 365 SPF value, according to Microsoft Learn.
Does SPF alone get Mimecast-relayed mail through DMARC?
Usually yes for direct delivery, but it is fragile. SPF checks the envelope sender (Return-Path), which normally stays on your domain, so it aligns. It breaks as soon as a recipient forwards the message, because the forwarder's IP is not in your SPF record. DKIM survives forwarding, so treat it as the mechanism you rely on.
The detail is in why DMARC fails when SPF passes and DMARC alignment explained.
How do I configure DKIM signing in Mimecast?
Create a "DNS Authentication – Outbound Signing" definition, generate a key for your domain, publish the public key at the selector Mimecast shows, then attach the definition to an outbound DNS Authentication policy. Mimecast describes the steps in Configuring DNS Authentication Definition.
- In the Administration Console, go to Policies | Gateway Policies, open the Definitions drop-down and choose DNS Authentication – Outbound Signing.
- Select Sign Outbound Messages with DKIM and look up the internal domain.
- Choose a DKIM Key Length of 1024 or 2048 bits, then click Generate. The private key stays in Mimecast.
- Publish the Public Key as a TXT record at the DNS Address, which has the form
selector._domainkey.domain. - Click Check DNS, then Save and Exit. Mimecast notes that a key validated but not saved will not sign mail.
- Apply the definition through a DNS Authentication policy for outbound mail from that domain.
The published record looks like this (selector and key shortened):
mimecast20261112._domainkey.example.co.uk TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh...IDAQAB"
Mimecast's example selector uses a mimecastYYYYMMDD pattern, which makes key rotation easy to track. A 2048-bit key exceeds the 255-character limit of a single TXT string, so your DNS host must split it into several strings in one record. See DKIM selector explained for how selectors work.
Should Microsoft 365 also DKIM-sign mail that leaves through Mimecast?
Mimecast's DNS Authentication overview advises that only Mimecast should sign. If an upstream server signs and Mimecast then changes the message, for example by adding a disclaimer, the upstream signature breaks. An aligned Mimecast signature is enough for DMARC.
How does Mimecast check DMARC on inbound mail?
Mimecast checks inbound DMARC through a "DNS Authentication – Inbound" definition with Verify DMARC for Inbound Mail enabled. For the "Fail" result, choose Honor DMARC Record. Mimecast then applies the sender's published policy, and quarantine results go to the Hold for Review queue.
Mimecast's recommended settings, from its overview article, are summarised here:
| Check | Result | Recommended action |
|---|---|---|
| SPF | Hard Fail | Reject |
| SPF | None, Neutral, Soft Fail, PermError, TempError | Ignore Managed/Permitted Sender Entries |
| DKIM | None, Fail, PermError, TempError | Ignore Managed/Permitted Sender Entries |
| DMARC | Fail | Honor DMARC Record |
| DMARC | None, PermError, TempError | Ignore Managed/Permitted Sender Entries |
"Ignore Managed/Permitted Sender Entries" means the message loses any allow-list benefit and still goes through spam checks. Where definitions conflict, the most restrictive action wins.
Mimecast also notes that strict DMARC checks can reject null-sender messages such as bounces and out-of-office replies. Its suggested fix is a narrow bypass policy for the empty sender address, not a broad exception.
Why does authentication break when MX points to Mimecast in front of Microsoft 365?
Because Microsoft 365 receives every message from Mimecast's IP addresses, not from the original sender. Exchange Online Protection (EOP) then evaluates SPF against Mimecast's IPs, and any change Mimecast makes can break DKIM. Without correction, legitimate mail can fail DMARC inside Microsoft 365 and spoofed mail is harder to spot.
The full mechanism is explained in why DMARC can fail when a gateway sits in front of Microsoft 365. Microsoft's fixes are:
- Enhanced Filtering for Connectors (skip listing) on the inbound Partner connector that receives mail from Mimecast. Exchange Online then looks past Mimecast to the real source IP. Microsoft calls this "highly recommended". Our Enhanced Filtering for Connectors guide has the MSP steps.
- Lock down the tenant with a Partner inbound connector restricted to Mimecast's certificate or IP ranges. Mail sent directly to the tenant's
mail.protection.outlook.comhost, bypassing Mimecast, is then rejected. - Avoid an SCL -1 bypass rule for Mimecast's IP addresses. Microsoft warns that shared filtering IPs could let spoofed messages through.
Google Workspace has the same problem behind a gateway. Its equivalent is the Inbound gateway setting under Apps > Google Workspace > Gmail > Spam, Phishing and Malware. List Mimecast's IP ranges and select Automatically detect external IP, so Gmail finds the first public IP outside the gateway list for SPF, as described in Google's inbound gateway help.
How does ARC help when Mimecast sits in front of the mailbox?
Authenticated Received Chain (ARC) lets Mimecast record the authentication results it saw and seal them with its own signature. If you trust that seal, the mailbox platform can use Mimecast's results even when the message was modified later. Mimecast's inbound policy documentation says it adds ARC headers and signatures to inbound messages.
In Microsoft 365, add the gateway as a trusted ARC sealer under Email & collaboration > Policies & rules > Threat policies > Email Authentication Settings > ARC, or with Set-ArcConfig. Microsoft's trusted ARC sealer guidance says to enter the d= domain from the ARC-Seal header, not your own domain.
Get-ArcConfig
Set-ArcConfig -Identity Default -ArcTrustedSealers "existing-sealer.example","mimecast-sealing-domain.example"
The Set-ArcConfig command replaces the list, so include existing sealers. Read the exact d= value from the ARC-Seal header of a message that came through the client's Mimecast account; do not guess it. ARC explained covers the headers.
What is the risk of policy bypasses and Permitted Senders in Mimecast?
The risk is that an allow entry lets spoofed mail skip the checks DMARC is meant to enforce. Mimecast's own policy FAQ notes that a Permitted Senders policy can cause a message to bypass spam scanning. An allow entry for a whole partner domain will also cover attackers who forge that domain.
Practical rules for MSP-managed tenants:
- Set DMARC and DKIM failures to "Ignore Managed/Permitted Sender Entries" so failing mail loses its allow-list status.
- Scope bypasses to IP plus sender, never a domain alone.
- Give every bypass an owner and an expiry, and review them each quarter.
- Check receipt events in Message Tracking for "Received via Permitted Sender" or "Auto-Allow" when spoofed mail is reported.
What should an MSP check for each Mimecast client?
Run the same checklist on every client, because Mimecast setups drift as admins add domains and policies. The aim is aligned DKIM on all outbound mail, correct regional SPF, and an inbound path where the mailbox platform still sees real authentication results.
- Confirm the client's Mimecast region and that SPF contains exactly one matching include, listed first, with no stale
mxmechanism. - Confirm an Outbound Signing definition and policy exist for every sending domain, including newly added domains.
- Send a test message to an external mailbox and confirm
dkim=passwithheader.d=matching the From domain, using the email header analyzer. - Check the inbound definition: DMARC verification enabled, "Fail" set to "Honor DMARC Record".
- For Microsoft 365, verify Enhanced Filtering on the Mimecast Partner connector and the lockdown connector.
- Add the Mimecast ARC sealing domain as a trusted sealer where messages are modified.
- Review Permitted Senders and bypass policies and remove anything without an owner.
- Watch aggregate reports for Mimecast IPs failing DKIM before moving from
p=nonetop=quarantine, thenp=reject.
How do I troubleshoot DMARC failures with Mimecast?
Start from the aggregate report or a failing message header, identify which check failed and whether the source IP belongs to Mimecast, then match the pattern below. Most issues come from missing signing definitions, wrong regional includes or a mailbox platform that is not looking past the gateway.
| Symptom | Likely cause | Fix |
|---|---|---|
| Mimecast IPs show SPF fail in reports | Wrong regional include or none at all | Add the include for the account's region |
| SPF PermError on the domain | Over 10 lookups, often from mx plus several includes |
Remove mx, consolidate includes |
DKIM pass but d= is not the client domain |
No Outbound Signing definition for this domain | Create the definition and policy |
| DKIM fail after Mimecast | Upstream signature broken by disclaimers or stationery | Let Mimecast sign; check upstream signing |
| Inbound mail marked as spoofed in Microsoft 365 | EOP sees Mimecast's IPs | Enable Enhanced Filtering for Connectors |
| Forwarded or modified mail failing in Microsoft 365 | Gateway changes break DKIM | Add Mimecast as a trusted ARC sealer |
| Bounces or auto-replies rejected | Strict DMARC on null senders | Narrow bypass for the empty sender |
| Spoofed mail delivered despite DMARC reject | Permitted Sender or allow entry | Use "Ignore Managed/Permitted Sender Entries" |
Frequently asked questions
Do I need the Mimecast include if mail only arrives through Mimecast?
No. SPF only describes servers that send mail for your domain. If Mimecast filters inbound mail but outbound mail goes straight from Microsoft 365 or Google Workspace, keep only that platform's include. Adding Mimecast anyway authorises IP addresses that do not send your mail and costs a DNS lookup.
Should I use a 1024-bit or 2048-bit DKIM key in Mimecast?
Use 2048 bits where your DNS host can publish a TXT record split into several strings, which most can. Mimecast warns that a 2048-bit key exceeds the 255-character string limit. If the DNS host cannot handle it, use 1024 bits and plan a later move.
Does Mimecast honour a sender's p=reject?
Yes, if configured. In the inbound DNS Authentication definition, enable DMARC verification and set the "Fail" action to "Honor DMARC Record". Mimecast then applies the sending domain's published policy, rejecting or holding failing messages, instead of a fixed local action.
Will the RFC 9989 changes affect Mimecast clients?
Mostly in the records you publish. RFC 9989 removes the pct tag, so rollout is by policy level: p=none, p=quarantine, then p=reject, with an optional t=y test flag. Remove leftover pct tags from client records; receivers following RFC 9989 ignore them.
Next steps
Pick one Mimecast client and run the checklist above against a test message and last week's aggregate reports. Fix signing and SPF first, then the Microsoft 365 or Google Workspace inbound path, then bypass policies.
DMARC AI processes aggregate reports per client domain and gives AI-assisted guidance, which helps MSPs spot Mimecast IP ranges failing alignment across many tenants. Whatever tooling you use, confirm each change in the reports before raising the policy.