Deliverability

Mimecast breaks DKIM body hash: SES mail lands in M365 Junk

When Mimecast edits a message before Microsoft 365 sees it, the DKIM body hash no longer matches, SPF is checked against Mimecast's IP, and DMARC fails with them. A low-volume sender has no reputation to offset that. The fix sits mostly on the recipient's side: trusting Mimecast's hop, trusting its ARC seal, or allow-listing you.

Sohail HussainSohail Hussain11 min read

Short answer

  • Mimecast changes the message after SES signs it, so Microsoft 365 sees a DKIM body hash failure, checks SPF against Mimecast's IP, and fails DMARC. The fix sits mostly with the recipient's admin.
  • Ask them to turn on Enhanced Filtering for Connectors on the connector that receives mail from Mimecast, or to trust Mimecast's ARC seal. A targeted allow-list is the fallback.
  • You cannot fix this from the SES side, and a 5-a-day sender has no reputation to offset it.

Your message leaves Amazon SES with SPF, DKIM and DMARC all passing, then lands in Junk at a customer whose mail goes through Mimecast before Microsoft 365. The header shows dkim=fail (body hash did not verify). Your DNS is fine. Something between SES and the mailbox edited the body.

A low-volume transactional sender on SES described exactly this on a public email forum: clean at the first hop, Junk behind Mimecast. Users report the same pattern with other gateways such as Proofpoint.

Why it happens

Three failures stack up, and the first one triggers the other two.

  1. The DKIM body hash breaks. SES signs a hash of the body, stored as the bh= value in your DKIM signature. If the gateway adds a footer or external-sender banner, rewrites links, or sanitizes an attachment, the body changes and the hash no longer matches.
  2. SPF is checked against the wrong IP. With Mimecast as the inbound gateway, the connecting IP Microsoft sees is Mimecast's, not an SES address. Your SPF record does not authorize it.
  3. DMARC fails. DMARC needs an aligned SPF pass or an aligned DKIM pass, and you have neither at the final hop.

Microsoft documents this routing problem. In complex routing scenarios where mail goes somewhere else first, the source of the inbound connector is typically not the true indicator of where the message came from. An ARC seal is the usual way to keep the source information, but many services that modify messages don't support ARC.

Whether the message lands in Junk, quarantine or the inbox then depends on your DMARC policy and the tenant's filters. Microsoft's table: with p=none there is no DMARC-specific action and other filtering still applies; with p=quarantine the message goes to Junk Email. So a domain that publishes p=quarantine or p=reject is hit hardest.

At 5 emails a day, Google Postmaster Tools and Microsoft SNDS usually show nothing. They need volume to report on. Nothing is wrong with your setup; there is just no reputation data to counterbalance failing authentication. If you do reach a volume where Postmaster populates, our Google Postmaster Tools guide explains what it shows.

CauseSymptom in headersFix, and who does it
Gateway edits bodydkim=fail, body hash did not verifyStop the edits, or recover via skip listing (recipient)
SPF checked on gateway IPspf=fail or softfail, client IP is MimecastEnhanced Filtering for Connectors (recipient)
ARC seal not trustedARC headers present, final result still failAdd Mimecast's sealing domain as trusted (recipient)
ARC not added at allNo ARC-Seal headersEnable ARC signing in Mimecast (recipient)
Wrong DKIM key or selectorno key for signature or similarFix your DNS (you)

Confirm it is your cause

Ask a recipient for one Junked message as a full header dump. In Outlook they can open the message properties and copy the internet headers, or forward it as an attachment. Paste it into our email header analyzer or read it yourself. Look for:

  • Authentication-Results with dkim=fail and body hash did not verify. That means modification in transit, not a wrong DNS key.
  • spf=fail or softfail, with a client IP that belongs to Mimecast.
  • dmarc=fail, often alongside compauth=fail.
  • ARC-Seal and ARC-Authentication-Results headers added by Mimecast.
  • X-Forefront-Antispam-Report, where the SCL and SFV values show how Microsoft classified the message.

If the earlier ARC results show dkim=pass and the final result shows dkim=fail, something after SES changed the body. If DKIM fails for another reason such as a missing key, you have a DNS problem instead. Our SPF, DKIM and DMARC setup guide covers that, and the email headers explainer helps with the rest.

As a control, send the same message to a Gmail or personal Outlook.com address. If it passes there and fails only behind Mimecast, you have isolated the gateway.

Fix 1: ask the recipient's admin to enable Enhanced Filtering for Connectors

This is the cleanest fix, and only the recipient's admin can do it. Enhanced Filtering for Connectors is also called skip listing. Microsoft says it preserves the IP address from the previous hop and also intelligently recovers from DKIM signature failures. That covers both your SPF and DKIM problems in one setting.

Send their IT contact the header evidence and these steps from Microsoft's Enhanced Filtering documentation:

  1. Open the Microsoft Defender portal and go to Email & Collaboration > Policies & Rules > Threat policies > Rules > Enhanced filtering.
  2. Select the inbound connector that receives mail from Mimecast.
  3. Under IP addresses to skip, choose Automatically detect and skip the last IP address, which Microsoft recommends if you only need to skip the last message source. Otherwise list Mimecast's IPs.
  4. Under Apply to these users, test on a few mailboxes first, then switch to the whole organization.

Admin side effect

Microsoft says that after enabling this feature, admins should disable any mail flow rules that bypass spam filtering (SCL -1) for the same connector. If the tenant already has such a rule, the admin should check it before changing anything.

Fix 2: have the admin trust Mimecast's ARC seal

ARC records the authentication results the gateway saw before it changed the message. Microsoft 365 only trusts seals from sealers an admin has listed. The admin can add one under Email & collaboration > Policies & rules > Threat policies > Email Authentication Settings > ARC in Defender, as described in Microsoft's trusted ARC sealers page.

Two details trip people up:

  • The sealer domain is not the organization's own domain. It's the vendor's signing domain from the d= field of the ARC-Seal header. Have the admin copy it from a real message instead of guessing.
  • Mimecast has to be adding ARC seals in the first place. Microsoft's page lists the Mimecast setting as Administration > Gateway > Policies > Definitions > ARC Signing. If your Junked messages have no ARC headers, that is the first thing to ask for.

Microsoft also warns that adding unnecessary sealers increases the attack surface, so the admin should add only vendors they actually use.

Fix 3: stop Mimecast from modifying your mail

If the changes come from banners, stamps or URL rewriting, the recipient can exempt your sending domain from those Mimecast policies. This removes the cause instead of working around it. Ask them whether Mimecast is also configured to re-sign DKIM after modification; Microsoft lists configuring the gateway to preserve or re-sign DKIM after processing as one of its options for this scenario.

Fix 4: get your sender allow-listed

If a full authentication fix is too much to ask, a targeted allow-list is the practical fallback. Microsoft's own guidance for cases where ARC passes but mail still goes to Junk includes a mail flow rule that bypasses spam filtering for trusted senders or IPs, or adding the sender domain to an anti-spam policy allow list. A Tenant Allow/Block List entry is another route, but it is temporary and expires in 30 days.

Allow-listing a domain whose authentication fails is something attackers abuse, so the admin should scope it to the Mimecast connector or your sending IPs where they can. That is their call.

Stopgap for urgent mail

For a message someone is waiting on, such as a login code or invoice, ask the recipient to mark it Not junk. It only helps that one mailbox, so use it while the admin works on a real fix.

What you can control on the sender side

You cannot stop a gateway from editing your mail, but you can avoid making it worse.

  • Keep DKIM aligned with your From domain. Use Easy DKIM in SES so the signing d= domain is yours, not a shared signature.
  • Set up a custom MAIL FROM domain in SES so SPF aligns on the checks that do run against your IP.
  • Keep messages simple: one From domain, few links, no link shorteners, and no tracking redirects you do not need. Rewriting engines touch these first, and filters distrust them.
  • Do not use the DKIM l= body-length tag as a workaround. It lets appended text pass verification, but it is a known spoofing risk and many receivers discount it.

Should you change provider?

Probably not as a first move. The first hop passed, so your sending infrastructure did not fail, and no provider can stop a customer's gateway from editing the body. A shared IP pool at a provider with a strong reputation can help with IP-based filtering, because your own volume builds none. Domain reputation is still yours alone, tied to your DKIM domain and content, and it does not travel with the pool.

Change provider if you see IP reputation problems across many unrelated recipients. Push for recipient-side fixes if every failure comes from organizations behind the same gateway.

Checklist before you contact the recipient

  • You have the full headers of at least one Junked message.
  • dkim=fail with a body hash reason is visible in the final Authentication-Results.
  • The client IP in the SPF result belongs to Mimecast.
  • You know whether ARC-Seal headers are present and what their d= value is.
  • Your own DKIM and SPF pass on a control message to Gmail or Outlook.com.
  • Your DMARC policy is known, since p=none and p=quarantine behave differently at Microsoft.

If nothing works

Contact the recipient organization's IT or mail admin first. They own the Mimecast and Microsoft 365 settings. If they cannot change anything, ask them to open a case with Mimecast support about ARC signing and body modification. Include one full header dump, the timestamps, the sending domain, and which of the fixes above you already asked for.

Subject: Mail from {your-domain} lands in Junk behind Mimecast

Hi,

Messages from {your-domain} (sent via Amazon SES) pass SPF, DKIM and DMARC
at our first hop but are delivered to Junk in your Microsoft 365 tenant.
The attached headers show dkim=fail (body hash did not verify) and SPF
evaluated against a Mimecast IP, which points to the message being modified
by the gateway.

Could you please check one of these:
1. Enhanced Filtering for Connectors (skip listing) on the inbound connector
   that receives mail from Mimecast.
2. ARC signing enabled in Mimecast and its sealing domain added as a trusted
   ARC sealer in Microsoft Defender.
3. A scoped allow entry for {your-domain} as a temporary measure.

Sample message sent: {date and time, with time zone}
Recipient: {recipient address}

Common questions

Why does this happen at 5 emails a day and not at 5,000?

It probably does at 5,000 too, but the failure is more visible at low volume. A high-volume sender builds reputation that can partly offset the authentication failure; a tiny sender has none. Reputation signals also take time and traffic to appear.

Can I fix it with DNS changes?

Not if the cause is body modification. Your DKIM key is valid; the content changed after signing. DNS changes only help when the failure reason is a missing or wrong key, or a misaligned SPF or DKIM domain.

Does a stricter DMARC policy make this worse?

Yes. Microsoft's table shows p=quarantine sends failing mail to Junk and p=reject rejects it during SMTP. Publishing a p=none policy while you sort out recipient-side fixes is a decision for you and your domain's owner. Our DMARC glossary entry explains the policies.

Can I tell in advance which recipients use Mimecast?

Often, yes. Look up the recipient domain's MX records; gateway vendors usually show up in the hostnames. Group your Junk complaints by recipient domain, because one conversation per company is faster than any change on your side.

This reflects documentation as of November 2026. Microsoft and Mimecast rename menus, so rely on the setting names and search terms if a path differs.

deliverabilityamazon-sesmimecastmicrosoft-365
Share this article
Sohail Hussain

Sohail Hussain

Founder & CEO at Mailneo

Building Mailneo — AI-powered email marketing for growing businesses.

Related Articles

Deliverability

421 4.7.28 Gmail Unusual Rate of Unsolicited Mail: Fixes

The 421 4.7.28 error is a temporary Gmail deferral, not a block. Gmail is rate limiting a domain, DKIM domain or IP range it sees sending too much unwanted mail. Retries usually deliver, but you should fix authentication, unsubscribe headers, sending pace and shared infrastructure to stop it recurring.

Sohail Hussain|9 min read
Deliverability

451 4.7.500 Server busy: SMTP2GO stuck at Processed (Microsoft)

`451 4.7.500 Server busy. Please try again later.` is a temporary Microsoft deferral of the connecting IP, not a problem with your message. SMTP2GO keeps retrying, so mail sits at "Processed" for hours. Ask SMTP2GO to rotate your IP, move to a dedicated IP, or allow-list carefully in Defender.

Sohail Hussain|9 min read
Deliverability

535 5.7.139 Authentication unsuccessful: Microsoft 365 SMTP fixes

535 5.7.139 means Microsoft 365 refused the SMTP login even though the password may be right. The usual cause is that Authenticated SMTP is disabled for the mailbox or tenant, or Security Defaults blocks basic auth. Enable SMTP AUTH per mailbox, adjust Security Defaults or Conditional Access, use OAuth, or switch to a connector.

Sohail Hussain|9 min read
Deliverability

550 5.7.1 Message lacks SPF/DKIM/DMARC: Find the Real Cause

Outlook.com and Hotmail return "550 5.7.1 Message rejected: Message lacks SPF/DKIM/DMARC Auth Records" when a message fails their authentication checks. Valid SPF alone is not enough. Publish SPF, DKIM and an enforced DMARC policy for your From domain, then confirm the real cause in Message Trace.

Sohail Hussain|10 min read

Ready to supercharge your email marketing?

Start sending smarter emails with AI-powered campaigns. No credit card required.

Get Started Free