Why Microsoft 365 bounces auto-forwarded mail with 5.7.520 Access denied, Your organization does not allow external forwarding, how the outbound spam policy, remote domains and mail flow rules interact, and how to allow forwarding for chosen users only.
Home › Guides › Exchange Online 550 5.7.520
Last updated 17 November 2026
Microsoft documents the NDR text as:
5.7.520 Access denied, Your organization does not allow external forwarding. Please contact your administrator for further assistance. AS(7555)
In the bounce it comes after a 5xx SMTP reply code, usually 550. Exchange Online detected an automatically forwarded message to an external recipient, and the outbound spam filter policy that applies to the forwarding mailbox blocks automatic external forwarding. The NDR goes to the person who sent the original message, not the mailbox owner, which is why outside senders often report it first.
Automatic forwarding here means an Inbox rule that forwards or redirects externally, or mailbox forwarding (SMTP forwarding) set by an admin. Forwarding between internal users isn't affected.
To fix it, decide who really needs external forwarding. Then either turn it on in the default outbound policy (not recommended) or create a custom outbound spam policy with On - Forwarding is enabled that applies only to those users.
Each outbound spam policy has an Automatic forwarding rules setting in its Forwarding rules section. In PowerShell it's the AutoForwardingMode parameter:
| Defender portal value | AutoForwardingMode | Effect |
|---|---|---|
| Automatic - System-controlled | Automatic | The default. It originally meant forwarding was on. In 2021 it changed to the equivalent of Off for new organizations and for existing ones that weren't actively using it. Organizations already using it may still get the old behaviour. |
| On - Forwarding is enabled | On | The policy doesn't disable automatic external forwarding. |
| Off - Forwarding is disabled | Off | Automatic external forwarding is disabled, and forwarded messages produce an NDR to the sender. |
Because Automatic can behave differently from one organization to the next, Microsoft recommends choosing On or Off explicitly. The setting applies to cloud mailboxes. Users who forward from an on-premises system through Microsoft 365 are subject to the same policy controls.
When forwarding is off, Microsoft says NDRs are generated for messages from external senders with every forwarding method. For internal senders, the NDR comes only when the method is mailbox forwarding. An Inbox rule doesn't generate one for internal senders.
Microsoft's recommended pattern is to leave the default policy at Off and create a custom outbound spam policy for the people who need external forwarding.
https://security.microsoft.com/antispam).The default outbound policy always has the lowest priority, and protection stops after the first policy that applies to a sender. So a custom policy scoped to those users wins over the default. Creating or changing policies needs the Organization Management or Security Administrator role group in Exchange Online (or the matching Microsoft Entra or Defender roles).
A policy has two parts: the policy (settings) and the rule (who it applies to, and its priority).
New-HostedOutboundSpamFilterPolicy -Name "Allow external forwarding" -AutoForwardingMode On New-HostedOutboundSpamFilterRule -Name "Allow external forwarding" -HostedOutboundSpamFilterPolicy "Allow external forwarding" -From user@contoso.com # Make the default explicit instead of relying on Automatic Set-HostedOutboundSpamFilterPolicy -Identity Default -AutoForwardingMode Off # Check what each policy does Get-HostedOutboundSpamFilterPolicy | Format-Table Name,AutoForwardingMode Get-HostedOutboundSpamFilterRule
Rules can also use -FromMemberOf (group members) or -SenderDomainIs (sender domains) instead of -From. Store these commands in the PowerShell Cheat Sheet for next time.
The outbound spam policy is not the only forwarding control. Microsoft lists:
Set-RemoteDomain -AutoForwardEnabled, and $true is the default for the built-in remote domain named Default in Exchange Online. Microsoft notes that remote domain settings override forwarding that users set up (Inbox rules and Outlook on the web forwarding). Forwarding that an admin configures, such as mailbox forwarding or a mail flow rule, isn't affected by the remote domain.When one control allows external forwarding and another blocks it, the block typically wins. For example, if the outbound policy is On but a remote domain or mail flow rule blocks auto-forwarded mail, the message is still blocked. That lets you set the outbound policy to On for a group and use remote domains to limit which external domains they can forward to.
Microsoft points to the Auto forwarded messages report for cloud accounts. For users who forward from on-premises through Microsoft 365, it suggests a mail flow rule. The condition is the message header X-MS-Exchange-Inbox-Rules-Loop matching . (any value), and the action is something like setting a header X-Forwarded to True, with a Severity so the rule shows up in the transport rule report.
Unexpected external forwarding is a classic sign of a compromised mailbox, so review the forwarding destinations before you allow them. If you need to see how a forwarded copy authenticates at the far end, paste its headers into the Email Header Analyzer. Forwarding often breaks SPF and DMARC at the receiver (see DMARC fails after forwarding), so check your domain with the SPF Record Checker, DKIM Checker and DMARC Record Checker, or all at once with the Email Deliverability Checker.
Get-HostedOutboundSpamFilterPolicy | Format-Table Name,AutoForwardingMode and Get-HostedOutboundSpamFilterRule to confirm the user is covered by a policy set to On.Need SPF, DMARC and MX checks across a whole client list? Run the Bulk SPF / DMARC / MX Auditor on Apify ($2 per 1,000 domains).
Check how forwarded copies authenticate with the Email Header Analyzer, review your domain with the Email Deliverability Checker, SPF Record Checker, DKIM Checker and DMARC Record Checker, and keep cmdlets in the PowerShell Cheat Sheet. Related guides: DMARC fails after forwarding, Exchange Online 550 5.4.1, Exchange Online 550 5.1.10 and Exchange Online 550 5.7.708.
Exchange Online found an automatically forwarded message going to an external recipient, and the outbound spam filter policy for the forwarding mailbox blocks automatic external forwarding. Microsoft documents the NDR with AS(7555) at the end. The bounce goes to the original sender.
The default automatic forwarding setting, Automatic - System-controlled, changed in 2021 to behave like Off for new organizations and for those not actively using it. Microsoft recommends setting On or Off explicitly instead of relying on Automatic.
Create a custom outbound spam policy with Automatic forwarding rules set to On - Forwarding is enabled and scope it to that user or a group. In PowerShell use New-HostedOutboundSpamFilterPolicy with AutoForwardingMode On and New-HostedOutboundSpamFilterRule with From or FromMemberOf. Leave the default policy at Off.
Another control may still block it. Remote domains with automatic forwards turned off and mail flow rules that block auto-forwarded mail both apply, and when one control allows forwarding and another blocks it, the block typically wins. Also confirm the custom policy actually covers the user.
No. Microsoft says automatic forwarding between internal users is not affected by outbound spam filter policies. Only forwarding to recipients outside the organization is controlled.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.