T The Triage ManualTechnical Guides for IT Emergencies
P3 · Exchange & Mail Flow

Microsoft 365 SMTP Relay Configuration — Enabling IP-Based SMTP Sending for On-Premises Devices via Exchange Online Connector

On-premises devices (printers, scanners, applications) fail to relay outbound email through Exchange Online when no inbound connector exists to authenticate by IP address. Without proper configuration, SMTP submissions to smtp.office365.com are rejected because the device lacks a licensed mailbox credential. Resolution requires creating an inbound connector in Exchange Admin Center that allows relay from specific static public IP addresses, eliminating the need for per-device credentials.

Indicators

Likely causes

Diagnostic steps

  1. Identify the public IP address of the on-premises device, application, or server that needs to relay email. Confirm it is static and will not change. Use whatismyip.com from the device network or check with ISP.
    The Exchange Online inbound connector uses IP address matching to authorize relay; a dynamic IP will break the connector.
  2. Log in to the Microsoft 365 admin portal and navigate to the Exchange Admin Center (EAC) at admin.exchange.microsoft.com.
    Confirms administrative access and provides the interface to create the required inbound SMTP relay connector.
  3. In the Exchange Admin Center, navigate to Mail Flow > Connectors and review any existing connectors to determine if an inbound relay connector is already present for the device's IP.
    Avoids creating duplicate connectors and identifies whether the issue is a missing connector or a misconfigured existing one.
  4. Test SMTP connectivity from the device network to the tenant MX endpoint on port 25: Test-NetConnection -ComputerName tenant-com.mail.protection.outlook.com -Port 25
    Determines whether the failure is network connectivity, port blocking by ISP, or an Exchange Online policy rejection.
  5. Verify the sender domain used by the device matches an accepted domain configured in the Microsoft 365 tenant under Settings > Domains in admin.microsoft.com.
    Exchange Online will reject relay if the From address domain is not an accepted domain in the tenant, even with a valid IP connector.
  6. Review Mail Flow > Message Trace in EAC for any recent failed delivery attempts from the device's IP to identify specific rejection reasons.
    Message trace provides the exact Exchange Online rejection response and identifies which policy or connector rule blocked the message.

Resolution path

Prevention

Tools

References

Microsoft 365Exchange OnlineSMTPSMTP RelayMail FlowConnectorExchange Admin CenterPrinterScannerOn-premisesEmail RelayPort 25Hybrid MailIP AuthenticationMX Endpoint