554 5.7.0 forwarding from Exchange to Gmail: DMARC fix
Forwarded mail from Microsoft 365 to Gmail fails with "554 5.7.0" when the original sender's DMARC policy is reject. The forward fails SPF because Microsoft's servers aren't authorized, and DKIM is broken or missing. Keep the message unmodified so DKIM survives, or make Google the front door.
Sohail Hussain10 min readShort answer
- The 554 5.7.0 bounce means Gmail enforced the original sender's DMARC reject policy on a forwarded message, because forwarding broke SPF and DKIM did not pass with alignment.
- The most reliable fixes are to keep the DKIM signature intact (no disclaimers or subject tags on forwarded mail) or to add Microsoft as an inbound gateway in Google Admin so Gmail does not enforce the sender's DMARC policy on it.
- SRS alone will not fix a DMARC reject.
You forward mail from an Exchange Online (Microsoft 365) mailbox to a Gmail or Google Workspace address, and the sender gets a bounce containing Remote server returned '554 5.7.0. Some senders get through and others, usually banks, SaaS vendors and big brands with strict DMARC, never arrive.
Why it happens
554 is a permanent SMTP failure and 5.7.0 is the generic "security or policy" enhanced status code. The reason is in the text after the code, so read that first. If it mentions DMARC, SPF or unauthenticated mail, this article applies.
Here is the usual chain of events:
- The original sender publishes SPF for its own servers only and a DMARC policy of
p=reject. - Your Exchange Online mailbox forwards the message from Microsoft's servers, so Gmail sees an IP that the original sender's SPF does not list. Microsoft's own troubleshooting guide calls this failure expected for forwarded mail.
- DMARC needs SPF or DKIM to pass and align with the From domain. If DKIM was broken in transit, or never aligned, both checks fail.
- With both failing and a reject policy, the receiving side refuses the message. Microsoft states that if the original sender uses
p=reject, servers that enforce DMARC might reject the forwarded message.
Microsoft's Sender Rewriting Scheme (SRS) documentation explains that SRS rewrites the envelope sender so SPF can pass after forwarding, but it does not solve DMARC. The rewritten domain is not the From domain, so it does not align. For background, see our glossary entries on DMARC, SPF and DKIM.
Less common causes:
- A mail flow rule, disclaimer, or security add-on that edits the message and breaks the DKIM body hash.
- The original sender does not DKIM-sign with its own From domain, or signs with a different domain (for example an
onmicrosoft.comsignature), so DKIM passes but does not align. - The bounce came from a gateway or filter in front of the Google mailbox, not from Google. Read the remote server name in the bounce.
Confirm the cause from the headers
Open the bounce's attached original, or the headers of a similar message that did arrive. Look at Authentication-Results:
spf=fail smtp.mailfrom=sender.example
dkim=fail (body hash did not verify) header.d=sender.example
dmarc=fail (p=REJECT) header.from=sender.example
| What you see | What it means | Go to |
|---|---|---|
dkim=fail (body hash did not verify) | Something changed the message after it was signed | Fix 1 |
dkim=pass but dmarc=fail, header.d differs from From domain | Signature does not align with the From domain | Fix 2 or Fix 3 |
| No DKIM signature at all, SPF-only sender | Nothing can survive a forward | Fix 3 or Fix 4 |
Bounce text mentions external forwarding or 5.7.520 | A Microsoft setting, not DMARC | Fix 5 |
If raw headers are hard to read, paste them into our email header analyzer, or read understanding email headers.
Step-by-step fixes
Fix 1: stop changing forwarded messages
Any edit to the signed body or signed headers breaks DKIM. This is the cheapest thing to check.
- In the Exchange admin center, open Mail flow > Rules.
- Find rules that add a disclaimer, footer, external-sender banner, or subject prefix.
- Add an exception for messages going to your Gmail forwarding address, or narrow the rule's scope.
- Check third-party security, archiving or link-rewriting add-ons in the same path and exclude forwarded mail from them.
- Forward a fresh test message from a sender with
p=rejectand check the headers again. Ifdkim=passand aligned, DMARC passes.
This helps only for senders who DKIM-sign with their own domain. Microsoft's DMARC guidance says DKIM survives forwarding if the body is not modified.
SPF-only senders
If the original sender does not DKIM-sign, no setting on your side can make a forwarded copy pass DMARC. Use Fix 3 or Fix 4 for those senders.
Fix 2: check how the forward is built and what SRS does
SRS is on by default for applicable external mail from Microsoft 365, and it does not change the visible From address. Check the Return-Path on a forwarded message. If it still shows the original sender's domain, no rewrite happened.
Be realistic about the payoff. SRS can make SPF pass at Gmail for the rewritten envelope domain, but Microsoft says the only reliable way for DMARC to pass is a DKIM signature that uses the From domain and stays intact until it reaches the final destination. Treat SRS as helpful for receivers that check SPF alone, not as the fix for a DMARC reject.
If you own the forwarded-from domain and also send mail, enable DKIM for your custom domain in Microsoft 365 so your own outbound mail aligns. Microsoft's troubleshooting page gives this PowerShell command for Exchange Online, with your domain in place of the example:
Set-DkimSigningConfig -Identity example.com -Enabled $true
Fix 3: make Gmail treat Microsoft as an inbound gateway
If you administer the Google Workspace side, this is often the best fix. Google's inbound mail gateway help page says Gmail does not enforce the sender's DMARC policy for messages that arrive from the inbound gateway. It also uses the gateway setting to pick the correct source IP for SPF checks.
- In Google Admin, go to Apps > Google Workspace > Gmail > Spam, Phishing and Malware.
- Select your top-level organization.
- Scroll to Inbound gateway and click Edit.
- Add the sending IP ranges of Exchange Online (Microsoft publishes them; use the current list and review it periodically).
- Turn on Automatically detect external IP and, if appropriate, Require TLS for connections from the email gateways listed above.
- Save, wait a few minutes, and forward a test message from a strict-DMARC sender.
Google's help recommends setting forwarding servers as inbound gateways rather than adding them to an IP allowlist.
Check the scope first
Inbound gateway settings are only configurable at the top-level organization and apply to all organizations. Confirm that trusting Microsoft's ranges is acceptable for your whole Workspace domain.
Fix 4: route differently or re-send as your own mail
Forwarding is the fragile part, so avoid it where you can.
- Point the domain's MX records at Google, and route to Microsoft from Google if some users still need Exchange mailboxes. The first server that receives the message then checks SPF, DKIM and DMARC against the real sender.
- Use shared mailboxes or groups instead of per-user auto-forwarding for business mail.
- Re-send content as a new message from your own domain, with your own SPF and DKIM. You lose the original sender's authentication, but your message passes.
Fix 5: rule out a Microsoft forwarding block
If the bounce does not mention DMARC and says forwarding is not allowed, or you see 5.7.520, the cause is a Microsoft policy. In the Microsoft Defender portal, open the outbound spam filter policy and check the Automatic forwarding setting. Microsoft Q&A answers point to the value On - Allow automatic forwarding as the setting that permits it. Changing this lets forwarding happen; it does not fix DMARC.
Fix 6: ARC is a bonus, not a plan
Microsoft recommends trusted ARC sealers and Enhanced Filtering for Connectors where Microsoft 365 is the receiving side. For Gmail as the destination, whether it trusts the Microsoft ARC seal is Google's decision, and you cannot enable that from Exchange. Do not depend on it.
Which fix to pick
| Situation | Best fix | Effort |
|---|---|---|
| Disclaimer or banner rule on forwarded mail | Fix 1 | Low |
| You administer both Exchange and Workspace | Fix 3 | Low to medium |
| Strict senders with no DKIM | Fix 3 or Fix 4 | Medium |
| Moving users to Google anyway | Fix 4, MX to Google | Medium |
| One or two senders bounce | Ask them to DKIM-sign with their From domain | Depends on them |
Checklist before you try again
- The bounce text after
554 5.7.0mentions DMARC, SPF or authentication. - You know which server issued the rejection.
- No transport rule or add-on edits the forwarded message.
- The
Return-PathandAuthentication-Resultsof a forwarded copy are saved. - If you run Workspace, Microsoft's ranges are in the inbound gateway list.
- You tested with a sender that publishes
p=reject, not a lenient one.
Prevent it
- Avoid auto-forwarding bulk business mail between tenants; prefer shared mailboxes, groups or MX-level routing.
- Keep content-modifying rules out of any path that ends in an external forward.
- Make sure your own domain signs DKIM; our SPF, DKIM and DMARC setup guide covers it.
- Review DMARC aggregate reports on your own domain. Forwarding failures show up there as SPF and DKIM misses from forwarder IPs.
Google's best practices for forwarding email to Gmail say forwarded messages often fail SPF, which is why DKIM matters so much.
If nothing works
If headers show an aligned dkim=pass and dmarc=pass and Gmail still refuses the message, contact Google Workspace support. If the message never leaves Microsoft, or Return-Path and SRS behavior look wrong, contact Microsoft 365 support. Include:
- The full bounce text with the remote server name.
- Raw headers of one failed and one successful forward.
- Timestamps with time zone, and the message ID.
- Your Workspace inbound gateway and routing settings, and your Exchange forwarding method.
Subject: Forwarded mail from Exchange Online rejected by Gmail with 554 5.7.0
Mail forwarded from {user}@{your-domain} (Exchange Online) to {address}@{workspace-domain} is rejected with:
Remote server returned '554 5.7.0 ...'
Original sender domain publishes DMARC p=reject.
Forwarded copy shows spf=fail and dkim={result}.
Timestamp: {date, time, time zone}. Message ID: {id}.
Steps tried: removed content-modifying mail flow rules; added Microsoft ranges as inbound gateway: {yes/no}.
Headers and the full bounce are attached. Please advise why the message is rejected.
Common questions
Does SRS fix a DMARC reject on forwarded mail?
No. Microsoft states that SRS does not resolve forwarded messages failing DMARC, because DMARC needs an aligned SPF or DKIM pass. It helps SPF-only checks.
Why do only some senders bounce?
Only senders with a strict DMARC policy (p=reject) trigger refusals when both SPF and aligned DKIM fail. Senders with p=none are usually delivered, even if authentication fails.
Can I fix this from the Exchange side only?
Partly. You can stop modifying messages so DKIM survives (Fix 1), but if the sender does not DKIM-sign, only a Workspace-side gateway setting or a routing change helps.
Is a 554 5.7.0 always DMARC?
No. It is a generic policy code. Read the text after it and the server name, since a gateway in front of Google can issue its own policy rejection.
Explore: Email Deliverability
Related Articles
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.
Gmail rejects Microsoft 365 mail: 550 5.7.350 very low reputation
This bounce means Microsoft 365 passed your message to Gmail, and Gmail refused it because it distrusts the sending domain, the Microsoft IP that delivered it, or the content. Passing SPF, DKIM and DMARC won't clear it. Check the IP in the bounce, register Postmaster Tools, fix alignment and content, then ask Google for review.
Gmail 550 5.7.1 likely unsolicited mail when SPF, DKIM pass
The Gmail error 550 5.7.1 "likely unsolicited mail" is a reputation and content block, not an authentication failure. Passing SPF, DKIM and DMARC is only the entry requirement. The usual fixes are one-click unsubscribe headers, Postmaster Tools, slower and steadier volume, and a separate subdomain for bulk mail.
421-4.7.0 Gmail Has Detected This Message Is Suspicious: Fix
The 421-4.7.0 "suspicious due to the nature of the content and/or the links" error means Gmail's content filter rejected your message after DATA, not an authentication check. Remove click tracking or move it to your own domain, drop URL shorteners, check link reputation, then retest with a plain message.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free