Error Details
| Fact | Value | Source |
|---|---|---|
| Exact error string | 550 5.1.8 Access denied - Bad outbound sender | Exchange admin center > Mail flow > Message trace |
| Affected build range | Exchange Online / Microsoft 365 | Microsoft documentation |
| Registry key involved | HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\EdgeTransportRole | Hybrid Exchange environment configuration |
| Relevant service/endpoint URL | https://admin.exchange.microsoft.com | Exchange admin center portal |
| Log line signature | Event ID 9345 in Application log on hybrid servers | Hybrid Exchange environment troubleshooting |
Log Files to Check
Application event logs on hybrid Exchange serversMessage trace logs in Exchange admin center
What This Error Actually Means
The error code "550 5.1.8 Access denied - Bad outbound sender" is a Delivery Status Notification (DSN) generated by Exchange Online when an attempt to send email from a domain or account that is not authorized within the Microsoft 365 tenant configuration fails. This error indicates that the SMTP MAIL FROM address used in the message does not match any of the accepted domains configured for the organization, or the sender's account has been automatically restricted due to suspected spam activity. The component responsible for raising this error is the Exchange Online transport service, which enforces strict rules on outbound email traffic to prevent abuse and ensure security. This includes checking against a list of blocked senders and verifying that the sender domain is an accepted domain within the tenant's configuration. If these checks fail, the message is rejected with the 550 5.1.8 error code.Affected Versions and Scope
This error affects all versions of Exchange Online and Microsoft 365 tenants where email traffic is managed through Exchange Online services. It applies to both standalone cloud deployments as well as hybrid environments that integrate on-premises Exchange servers with Exchange Online. The error does not apply to on-premises Exchange Server installations unless they are part of a hybrid deployment scenario.Where To Look First: Logs and Event IDs
To diagnose the root cause of this issue, you should first examine logs from both Exchange Online and any on-premises components involved in the message flow. In Exchange Online, review the Message Trace logs available through theExchange admin center > Mail flow > Message trace. Here, filter by sender to locate entries related to the failed outbound email attempt.
For hybrid environments, check the Application event log on any hybrid Exchange servers for Event ID 9345. This event is logged when there are authentication failures or issues with send connectors that use an unauthorized domain as their MAIL FROM address. Additionally, inspect the registry key HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\EdgeTransportRole on hybrid servers to ensure proper configuration of edge transport relay settings.
Root Causes
Unauthorized Sender Domain
If the SMTP MAIL FROM address uses a domain that is not listed as an accepted domain in Exchange Online, this will trigger the 550 5.1.8 error. To confirm if this is the cause, run the following PowerShell cmdlet:Get-AcceptedDomain | Select-Object Name, DomainName, DomainType
This command lists all accepted domains and their types in your tenant.
Blocked Sender Account Due to Spam Activity
Exchange Online automatically blocks sender accounts that send a high volume of messages to non-existent recipients within 24 hours. To check if this is the case, use:Get-BlockedSenderAddress | Where-Object SenderAddress -eq ''
This cmdlet will return any blocked addresses matching the specified user principal name (UPN).
Misconfigured Send Connectors in Hybrid Environments
In hybrid deployments, if an on-premises send connector uses a domain that has not been added as an accepted domain in Exchange Online, outbound emails from this domain will be rejected. To verify this configuration, check the registry keyHKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\EdgeTransportRole and ensure it aligns with your tenant's accepted domains.
Fix Procedure
- Add Missing Domain to Accepted Domains:
If the error is due to an unauthorized sender domain, add the missing domain as an accepted domain in Exchange Online:
New-AcceptedDomain -Name 'Then run the Hybrid Configuration Wizard (HCW) to synchronize changes with on-premises Exchange if applicable.' -DomainName ' .com' -DomainType Authoritative - Remove Sender from Restricted Senders List:
If the sender account was blocked due to suspected spam activity, remove it from the restricted senders list:
Remove-BlockedSenderAddress -SenderAddressAdditionally, in the Microsoft 365 Defender portal > Email & collaboration > Review > Restricted entities, click "Remove from list" next to the sender's UPN. - Investigate and Secure Compromised Accounts:
If an account was compromised for phishing activities, take immediate action:
- Reset the password:
Set-MsolUserPassword -UserPrincipalName- Revoke all active sessions:-NewPassword Revoke-AzureADUserAllRefreshToken -ObjectId- Enable MFA for the user.
Be cautious when resetting passwords or revoking tokens, as this can break enrolled devices and remote connections.
Error Code Variants
| Code | Description |
|---|---|
| 5.1.7 | Access denied - Bad sender domain (similar to 5.1.8 but for inbound mail) |
| 5.2.0 | Bad sequence of commands (related to SMTP protocol errors, not access control) |
| 4.7.0 | Message too big (quota exceeded for message size) |
Verification
After implementing the fixes, verify that the issue is resolved by sending a test email from the affected domain or account and checking if it successfully reaches its destination without triggering an NDR. Additionally, review the Message Trace logs in Exchange admin center to ensure no further 550 5.1.8 errors are logged for the sender.Prevention
To prevent recurrence of this issue, implement strict domain and account management policies: - Regularly audit accepted domains and blocked senders lists. - Enable multi-factor authentication (MFA) for all users to reduce risk from compromised accounts. - Monitor high-volume email traffic patterns and investigate sudden spikes in failed deliveries promptly.Use the
This guide provides a comprehensive approach for troubleshooting and resolving the 550 5.1.8 error in Exchange Online environments, ensuring secure and reliable email communication within your organization.Get-Mailbox -Identity | Select-Object EmailAddresses cmdlet to quickly verify a user's SMTP addresses against accepted domains.