IIS SMTP Relay with Microsoft 365: Legacy Setup and Migration Options

December 13, 2019

Older printers and business applications sometimes sent mail through a local Windows SMTP service. This article preserves the important configuration concepts from the original Windows Server 2008/2012 walkthrough, with the duplicated installation steps consolidated. It is not a recommendation to deploy those systems.

On this page

Support status and sending methods

The SMTP service administered through IIS 6.0 Manager is distinct from IIS web hosting. Microsoft’s Windows Server removed-features documentation confirms that Windows Server 2025 no longer contains SMTP Server and has no in-box replacement. Installing newer IIS web-server components does not restore it.

The old version of this article mixed mailbox credentials with anonymous outbound delivery. The configuration below describes connector-based relay: Microsoft 365 identifies the sending server through the connector, rather than a mailbox password. See the current connector instructions before relying on external delivery.

Understand an existing IIS relay

For a server that already has the SMTP service installed, open IIS 6.0 Manager → SMTP Virtual Server → Properties. Record the existing values before making changes. The two legs of the route have different access controls:

ConnectionConfiguration to inspect
Device → local SMTP serverThe device uses the relay’s private address. Inspect the listener IP and port, Connection restrictions and Relay restrictions.
Local SMTP server → Microsoft 365Inspect Delivery → Outbound Security, Outbound Connections and Advanced → Smart host. Confirm these agree with the Microsoft 365 connector.
  1. On General → Advanced, check the SMTP listener address and port. Avoid creating duplicate bindings.
  2. On Access → Connection, use Only the list below and allow only approved device IPs.
  3. On Access → Relay, allow only the required device IPs. Review any exception allowing all successfully authenticated computers to relay; disable it unless explicitly required.
  4. For devices using anonymous local submission, restrict that access with both SMTP permissions and the firewall. Anonymous access must not mean unrestricted relay.
  5. For the connector-based outbound route, inspect Delivery → Outbound Security: anonymous authentication and TLS encryption; Outbound Connections: port 25; Advanced: the tenant’s Microsoft 365 MX endpoint. Do not enter mailbox credentials for this route.

For connector prerequisites, DNS configuration and the correct tenant endpoint, use the current guide rather than the old portal paths.

Apply changes and restart SMTP

Schedule a maintenance window, record the current queue state and save the SMTP settings. Open services.msc, locate Simple Mail Transfer Protocol (SMTP) and restart that service. Confirm that it returns to Running and that the required SMTP virtual server is started in IIS 6.0 Manager.

A blanket IIS reset can interrupt unrelated web applications. Restart only the affected SMTP service unless a separately diagnosed dependency requires more. If the restart fails, inspect Windows event logs and restore the recorded configuration.

Test the legacy configuration

A local Pickup-folder test helps isolate the server’s outbound path. It does not test the printer’s ability to connect, authenticate or pass relay restrictions.

  1. Create a plain-text file outside the Pickup folder. Replace both addresses in the example with addresses you control.
  2. Save it as Email.txt and copy the complete file into the configured Pickup directory; the historical default is C:\Inetpub\mailroot\Pickup.
  3. Check SMTP logs and the configured Queue directory if delivery stalls. Confirm receipt and Exchange message trace; disappearance from the local queue alone is not proof of inbox delivery.
From: printer@your-domain.example
To: recipient@your-domain.example
Subject: Legacy SMTP relay test

This is a test message from the local SMTP server.

Investigate the full SMTP response or NDR. Check the configured Badmail location when relevant, but do not assume every failed delivery produces a file there. Also run the actual-device, external-recipient and unauthorized-host tests in the replacement guide.

Plan the migration

  • Inventory devices, applications, sender identities, permitted source IPs, recipients and typical message volume.
  • Select a supported sending approach using the method-selection table. Confirm that the device or replacement SMTP product can meet its authentication and encryption requirements.
  • Pilot one device. Compare delivery results, logging and access restrictions before moving the remaining senders.
  • Monitor the old queue and traffic during cutover. After dependencies have moved and queued mail is accounted for, retire the old service and remove obsolete firewall and connector entries.

Keep rollback settings and a named owner until acceptance tests pass. Book a cloud assessment if you need help choosing the replacement.

Microsoft sources


Related SMTP guidance

Topics:
Read next
November 16, 2026

How to Restore Deleted Files and Folders in OneDrive

Restore deleted OneDrive files from the recycle bin, use the whole-drive restore option when appropriate, and verify the recovery without overwriting newer work.
November 16, 2026

How to Investigate Failed Sign-Ins in Microsoft Entra ID

Use Microsoft Entra sign-in logs to isolate failed access, interpret error details, compare device and location signals, and decide what to verify next.
November 16, 2026

How to Search and Export Microsoft 365 Audit Logs in Microsoft Purview

Search Microsoft 365 audit logs in Microsoft Purview, narrow results with useful filters, export evidence, and avoid common retention and permission mistakes.