Configure an IIS SMTP Relay for Scan-to-Email with Microsoft 365
Question details
Set up an internal IIS SMTP relay for copiers, fax systems, and business applications instead of sending directly through Exchange Server.

- Product
- IIS SMTP Server, Exchange Server 2010, and Microsoft 365
- Device & OS
- not provided
- Scenario
- An organization with an Exchange 2010 hybrid deployment wants internal devices and applications to submit email to IIS for relay.
- Observed behavior
- The goal is for devices and applications to send through an authorized IIS relay while preserving the required internal and external mail flow.
Identify the devices' IP addresses, sender domains, required recipients, and the relay server's public outbound IP address. Check the existing hybrid mail flow, the Microsoft 365 SMTP endpoint, and whether the IIS server can reach it over TCP port 25 using the required TLS version.
Configure IIS to relay device mail through Microsoft 365
Use this approach when devices can submit mail to an internal IIS server and Microsoft 365 can authenticate the relay by public IP address or certificate.
Review accepted domains and hybrid routing before changing production mail flow. An IIS relay does not automatically replace Exchange connectors or guarantee delivery to on-premises mailboxes.
In the Exchange admin center, go to Mail flow > Connectors and create or review a connector from your organization's email server to Microsoft 365. Configure it to identify the relay by its static public IP address or an eligible TLS certificate, and verify that sender domains are accepted by your tenant.
Open IIS 6.0 Manager, right-click the SMTP virtual server, and select Properties > Access > Relay. Allow only the known copier, fax, and application IP addresses, and use network firewall rules to prevent unauthorized access.
In the SMTP virtual server Properties, open Delivery > Advanced and enter the Microsoft 365 Exchange Online Protection endpoint as the smart host. Under Delivery, configure outbound security and TLS as required, and confirm that outbound TCP port 25 is permitted.
In each device's or application's SMTP settings, enter the internal IIS server address and SMTP port, usually 25. Set an appropriate sender address in a domain accepted by Microsoft 365.
Send test messages to both Microsoft 365 and on-premises recipients and, if required, an external recipient. Use Exchange admin center > Mail flow > Message trace and inspect the IIS SMTP queues and C:\InetPub\MailRoot\BadMail for messages that IIS could not deliver.

Use WPS Office for documents alongside your mail system
WPS Office is a free, lightweight alternative for creating and editing office files. Its familiar interface and Microsoft Office format support make it easy to move documents between applications. It does not replace or configure an IIS SMTP relay.

Frequently Asked Questions
Can IIS relay mail to Microsoft 365 without an SMTP mailbox password?
Yes. Microsoft 365 SMTP relay can identify the sending server through a connector configured for its static public IP address or an eligible TLS certificate. Review the connector under Exchange admin center > Mail flow > Connectors.
Which address should devices use as their SMTP server?
Enter the internal IIS relay server's address in each device's SMTP settings. Allow the device's IP address under SMTP virtual server Properties > Access > Relay, and confirm the device can reach the configured SMTP port.
Where can I find messages that IIS could not deliver?
Check the IIS SMTP queues and C:\InetPub\MailRoot\BadMail. Also use Exchange admin center > Mail flow > Message trace to investigate messages that reached Microsoft 365.
Will this setup automatically deliver mail to Exchange 2010 mailboxes?
Not necessarily. Delivery to on-premises mailboxes depends on accepted domains, hybrid connectors, and routing. Test an on-premises recipient and review the existing hybrid configuration if delivery fails.
How can I prevent the IIS server from becoming an open relay?
In IIS 6.0 Manager, open SMTP virtual server Properties > Access > Relay and permit only authorized device and application IP addresses. Restrict network access to the SMTP port with firewall rules as well.




