Fix IIS SMTP Relay Error 454 Relay Access Denied
Question details
Resolve a relay access denied error when an IIS SMTP relay sends mail between internal addresses through Microsoft 365.

- Product
- IIS SMTP Server and Exchange Online Protection
- Device & OS
- not provided
- Scenario
- An IIS SMTP relay sends mail on port 25 using a Microsoft 365 protection MX record as its smart host.
- Observed behavior
- Mail between internal addresses fails with error 454 4.7.1 Relay access denied.
Identify the sending application's IP address, the relay's public outbound IP address, and the affected sender and recipient addresses. Record the time of a failed test message and the full SMTP response so you can compare them with relay logs and message trace results.
Check IIS SMTP relay permissions and outbound TLS
Use these checks to verify that IIS accepts mail from the sending application and can forward it securely to Microsoft 365.
In IIS 6.0 Manager, open the SMTP virtual server's Properties, select Access, and choose Relay. Under the relay restrictions, authorize the sending application's IP address or a limited trusted range.
In the SMTP virtual server's Properties, open Delivery > Advanced and verify that the smart host is the Microsoft 365 protection MX endpoint for your tenant. Under Delivery > Outbound Connections, confirm that the TCP port is 25.
Under Delivery > Outbound Security, check TLS encryption. Verify that the relay can establish a TLS connection to the Microsoft 365 endpoint and that outbound port 25 is allowed through the network firewall.
Send a message from the affected application to an internal recipient, then review the IIS SMTP logs and the returned SMTP response to see whether IIS or the upstream service rejected it.

Verify the Microsoft 365 connector and message trace
Use this solution when the IIS relay forwards mail to Exchange Online Protection but Microsoft 365 may not recognize or accept it.
Work with Office files while troubleshooting your mail relay
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations in a familiar interface. Its Office format support helps you move existing files into WPS with minimal disruption. It does not configure or repair IIS SMTP or Microsoft 365 connectors.

Frequently Asked Questions
Which IP address should I add to the Microsoft 365 connector?
For an IP-based connector, add the static public IP address that Microsoft 365 sees when the relay sends outbound mail. Review the connector under Exchange admin center > Mail flow > Connectors; the internal application IP belongs in the IIS relay restrictions instead.
How can I tell whether IIS or Microsoft 365 denied the message?
Review the full SMTP response and IIS SMTP logs, then search for the message under Exchange admin center > Mail flow > Message trace. A trace can show whether Exchange Online Protection received and processed it.
Where do I enable TLS for outbound IIS SMTP mail?
In IIS 6.0 Manager, open the SMTP virtual server's Properties, go to Delivery > Outbound Security, and check TLS encryption. Then test the connection to the Microsoft 365 smart host.
Does an internal recipient still need to be configured in Microsoft 365?
Yes. Microsoft 365 must recognize the recipient domain and have a valid recipient or route for the address. Check Mail flow > Accepted domains in the Exchange admin center and verify the recipient configuration.
What if the Microsoft 365 connector is correct but the relay still fails?
Check the IIS relay restrictions, smart host, outbound port 25, TLS negotiation, and network firewall. If the issue remains in IIS SMTP configuration, seek dedicated IIS support and provide the logs and full SMTP response.




