5.7.506: bad HELO name
Your server greeted Microsoft 365 with the name of the server it was connecting to, instead of its own fully qualified domain name.
- Microsoft
- Provider
- Permanent (5xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 5.7.506
- Temporary or permanent
- PermanentRefused for good: the message comes back to the sender, and resending it gets the same answer.
- Who has to act
- The sender. The fix is on the sending side: your domain, your server or your list.
- What the server says
5.7.506 Access Denied, Bad HELO
What it means
At the start of every SMTP session the connecting server introduces itself with HELO or EHLO, and it should give its own fully qualified domain name. Microsoft 365 rejects connections where the client instead announces the name of the server it is connecting to, a habit Microsoft calls typical spambot behavior, and answers with 5.7.506 Access Denied, Bad HELO. The fix is in the sending server's configuration: set its HELO name to its own host name, ideally the name its IP address resolves to in reverse DNS.
Common causes
- The sending server's HELO or EHLO name is set to the destination's host name.
- A misconfigured or malicious program fills in the HELO name with the server it connects to.
How to fix it
- 01Set the sending server's HELO or EHLO name to its own fully qualified domain name.
- 02Make sure that name resolves in DNS and matches the PTR record of the sending IP.
- 03If you did not configure this machine to send mail, check it for malware.
Sources
What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.
- Email nondelivery reports and SMTP errors in Exchange Onlinelearn.microsoft.com
Further reading
All 111 Microsoft codesEvery code in the wikiPaste your own bounce