Exchange Connection Problems

Fix IIS SMTP Relay Error 454 Relay Access Denied

John WilsonJohn Wilson Nov 20, 2026 869 views

Question details

Resolve a relay access denied error when an IIS SMTP relay sends mail between internal addresses through Microsoft 365.

Fix IIS SMTP Relay Error 454 Relay Access Denied
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.
Before you start

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.

Solution 1Recommended

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.

1
Review relay permissions

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.

2
Check the smart host and port

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.

3
Enable outbound TLS

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.

4
Send a test message

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.

Check IIS SMTP relay permissions and outbound TLS
Restrict relay access: Do not allow unrestricted relay access. Authorize only trusted senders and IP ranges.
Free Microsoft Office alternative

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.

Document relay settings and troubleshooting results in Writer or SpreadsheetsOpen and edit Microsoft Word, Excel, and PowerPoint formatsUse a familiar interface to transition from Microsoft OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

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.