Home › Exchange Online › 550 5.7.506

Exchange Online · 550 5.7.506 · Microsoft 365

Exchange Online Error 550 5.7.506: Bad HELO in Microsoft 365

The error occurs when a sending host uses the recipient's domain or non-FQDN in HELO/EHLO. Fix by setting the correct FQDN in the Send Connector or application.

Error Details

FactValueSourceNote
Exact error string550 5.7.506 Access Denied, Bad HELOExchange Online Protection (EOP) logs-> Indicates invalid EHLO greeting
Affected build rangeMicrosoft 365Product documentation-> Applies to all current builds
Registry key involvedNoneExchange Server logs-> Configuration issue, not registry-based
Relevant service/endpoint URLhttps://protection.outlook.comEOP documentation-> EOP enforces EHLO standards
Log line signatureEHLO <invalid_name>SmtpSend protocol logs-> Identifies incorrect HELO usage

Log Files to Check

What This Error Actually Means

The error code 550 5.7.506 Access Denied, Bad HELO indicates that Exchange Online Protection (EOP) has rejected an inbound SMTP connection due to an invalid HELO/EHLO greeting from the sending host. Specifically, the connecting server announced itself using the recipient's domain name or a non-routable hostname (e.g., *.mail.protection.outlook.com or localhost) instead of its own fully-qualified domain name (FQDN). This behavior is characteristic of spambots, as legitimate servers always identify themselves using their own public FQDN in the HELO/EHLO command. The error originates from EOP's SMTP filtering logic, which enforces RFC 5321 compliance for the EHLO argument. When a sending host violates this rule by announcing an invalid or non-routable hostname, EOP terminates the connection immediately with this specific error code.

Affected Versions and Scope

This issue affects all Microsoft 365 tenants using Exchange Online Protection (EOP), regardless of their subscription tier. It is not limited to any specific OS build range but rather depends on the configuration of the sending host's SMTP client or server. The error does not relate to IP reputation, SPF/DKIM/DMARC failures, or banned IPs, which produce different error codes such as 5.7.501, 5.7.509, or 5.1.8.

Where To Look First: Logs and Event IDs

To diagnose this issue, examine the following log sources:
  1. SmtpSend Protocol Log: Locate the file at %ExchangeInstallPath%TransportRoles\Logs\Hub\ProtocolLog\SmtpSend\SEND*.LOG. Search for the exact log line signature EHLO , followed by the error response 550 5.7.506 Access Denied, Bad HELO.
  2. Exchange Online PowerShell: Use the cmdlet Get-MessageTrace -StartDate (Get-Date).AddHours(-2) -EndDate (Get-Date) to confirm whether the message was rejected at the EOP boundary. A rejected session will not show a "Delivered" status in the results.
Relevant Event IDs for this issue are: 4201 (EHLO command received) and 4203 (Connection rejected due to invalid EHLO).

Root Causes

1. Misconfigured On-Premises Exchange Send Connector

The most common cause is an on-premises Exchange Server configured with an incorrect FQDN in its Send Connector settings. For example, the connector might be set to announce itself as contoso.com (the recipient domain) instead of the organization's public mail server name like mail.contoso.com. This can occur during initial setup or after a domain rename operation.

2. Devices with Default SMTP Client Configuration

Multifunction printers, scanners, or line-of-business applications often ship with default SMTP client configurations that announce themselves using the target hostname (e.g., *.mail.protection.outlook.com) or an internal name like localhost. These devices need their HELO/EHLO settings updated to use a valid public FQDN.

3. Hybrid Deployments with Misconfigured Relays

In hybrid environments, third-party relays or EOP connectors might be configured to announce an invalid hostname during the EHLO exchange. This can happen if the relay's configuration does not properly map to the organization's public FQDN.

Fix Procedure

  1. Verify Current Configuration: Get-SendConnector | Format-List Name,Fqdn,SmartHosts Check if the Fqdn property matches your organization's public FQDN (e.g., mail.contoso.com). If it does not, proceed to step 2.
  2. Update Send Connector Configuration: Set-SendConnector -Identity "Outbound to Internet" -Fqdn mail.contoso.com Replace mail.contoso.com with your organization's actual public FQDN. Confirm the change with: Get-SendConnector | Where-Object {$_.Name -eq "Outbound to Internet"} | Format-List Fqdn
  3. Enable Protocol Logging (if not already enabled): Set-SendConnector -Identity "Outbound to Internet" -ProtocolLoggingLevel Verbose This will help diagnose future issues by capturing detailed SMTP handshake information.
  4. Test the Configuration: Use a tool like telnet contoso-com.mail.protection.outlook.com 25 to manually initiate an SMTP session and observe the EHLO response. A successful configuration will show:
    EHLO mail.contoso.com
    250-Contoso Microsoft ESMTP MAIL Service ready at ...
        
  5. Update Device or Application Configuration: For devices like MFPs, access their SMTP settings and update the HELO/EHLO field to use your organization's public FQDN instead of the target hostname or IP address.
  6. Hybrid Deployments: Review EOP connector settings in the Exchange Admin Center: Exchange admin center > Recipients > Inbound connectors. Ensure the SenderDomains and EFSkipIPs fields are correctly configured to match your organization's public FQDN.
Important: Before making changes, verify that the FQDN you intend to use matches the certificate name for TLS encryption. Mismatched certificates can cause additional SMTP errors.

Error Code Variants

Error Code Description Distinguishing Factor
5.7.501 Spam Reputation Block Indicates the sending IP is listed in Microsoft's blocklist due to spam activity.
5.7.506 Bad HELO/EHLO Greeting Specifically triggered by an invalid or non-routable hostname in the EHLO command.
5.7.509 DKIM/DMARC Policy Violation Occurs when the message fails DKIM or DMARC checks, unrelated to HELO configuration.
5.1.8 Banned IP Address Indicates the sending IP is explicitly banned by the recipient organization.

Verification

After implementing the fix, perform the following verification steps:
  1. Check SmtpSend Logs: Review the log file at %ExchangeInstallPath%TransportRoles\Logs\Hub\ProtocolLog\SmtpSend\SEND*.LOG. Look for a successful EHLO exchange:
    EHLO mail.contoso.com
    250-Contoso Microsoft ESMTP MAIL Service ready at ...
        
  2. Message Trace Verification: Use the Exchange Admin Center or PowerShell to confirm successful delivery: Exchange admin center > Mail flow > Message trace or Get-MessageTraceDetail -Identity <message-id>. A successfully delivered message will show a status of "Delivered" instead of being rejected at the EOP boundary.
  3. Network Diagnostics: Perform a DNS PTR record check for your sending IP and ensure it resolves to your organization's public FQDN: Resolve-DnsName -Type PTR <sending-ip>
Diagnostic Shortcut: Use the built-in PowerShell cmdlet Test-NetConnection contoso-com.mail.protection.outlook.com -Port 25 to quickly verify connectivity and observe the EHLO response directly.

Prevention

To prevent recurrence of this issue, implement the following measures:
  1. Monitor Send Connector Configuration: Regularly audit your Send Connectors using: Get-SendConnector | Format-List Name,Fqdn,SmartHosts
  2. Enforce FQDN Usage in Device Configurations: Update organizational standards to require the use of public FQDNs in all SMTP client configurations for devices and applications.
  3. Implement DNS Validation Scripts: Create a script to periodically check that your sending hosts' EHLO names resolve correctly to their public IPs. For example: Resolve-DnsName mail.contoso.com | Select-Object IPAddress
By following these steps, you can ensure compliance with RFC 5321 requirements and maintain uninterrupted email delivery through Exchange Online Protection.

Sources & References

Related Guides

Get new error code fixes by email

Product-specific solutions for Intune, Autopilot, SCCM and Entra ID — straight to your inbox. No spam.