Configuring SMTP Relay O365 For Flawless Email Deliverability

outbound smtp relay service

SMTP Relay Configuration – Office 365

There are a few prerequisites before you proceed with SMTP relay configuration. These are

  1. An Office 365 Subscription.
  2. A Windows 10 computer having PowerShell v5.1.
  3. A public static IP address.
  4. TCP port 25 with access from a client to the Office MX endpoint.
  5. A valid SSL certificate.

To set up an SMTP relay windows for office 365:

  • First, create a connector in Office 365, which accepts the SMTP transactions.
  • This connector will receive the SMTP relay transactions from the device or application.

Creating a Non-TLS connector through Exchange Admin Center

    1. Click on mail flow (1), then connectors (2) and later, New (3). The New Connector window will pop-up.
    2. In the New Connector window, select
      1. From: Your organization’s e-mail server (1),
      2. Choose To: Office 365 (2),
      3. Click Next (3).
    3. In the next window,
      1. You need to enter the name SMTP Relay (Non-TLS) or choose your name (1),
      2. Next, type in the description Accept relay from on-premises SMTP Server (2),
      3. Uncheck Retain internal Exchange e-mail headers (recommended) (3)
      4. And click Next (4).
    4. When the next window opens,
      1. Select the option By verifying that the IP address of the sending server match one of the IP addresses that belong to your organization (1),
      2. And click Add (2).
    5. In the new pop-up window,
        1. Type in your public IP address (1),
        2. Then click OK (2).

      It will bring you back to the previous window.

    6. Verify that the public IP address is added in the list and click Next.
    7. You are now in a position to confirm that the new connector gets created, back in the Exchange Admin Center.

Creating a TLS connector through Exchange Admin Center

In this Microsoft’s outbound SMTP relay service, you can create a TLS connector by following similar steps of creating a non-TLS connector.

  1. Head back to the New Connector wizard.
  2. Use the same mail flow scenario.
  3. A window will open, which says how Office 365 should identify e-mail from your e-mail server.
    1. Select the option By verifying that the subject name on the certificate which the sending server uses for authentication with Office 365 matches this domain name (recommended) (1),
    2. Key in the subject of the SSL certificate (2),
    3. Click Next (3).

MORE – Free SMTP Relay

Testing the SMTP Relay O365 Connector with PowerShell

The easiest way to check that a connector gets created by using PowerShell. For doing that, ensure the MX endpoint URL is for the Exchange Online domain. To find your MX endpoint URL:

  • Log in to Office 365 Admin Portal
  • Click on Setup
  • Select Domains
  • Click the Domain name
  • Copy the MX Points to the required address or value.

After performing these tests, you will have a functional SMTP relay set up in Office 365.

smtp service
smtp relay free

Confirming the SMTP Relay Hops using the Message Headers

You can confirm whether the messages are going through the SMTP relay O365, by reviewing the message headers on the received e-mails.

  1. Open the e-mail in Gmail,
    1. Click on the three vertical dots displayed(1),
    2. Then click on Show original (2),
  2. A new page will open, showing the e-mail message headers.
    1. Click on Copy to clipboard (1).
  3. Open a new browser tab and then navigate to https://testconnectivity.microsoft.com/.
  4. Go to the Message Analyzer tab and paste the copied data into the box. Then, click Analyze headers.
  5. The result of the analysis will get displayed in a tabular form.

You can see the following workflow in the results:

  1. The IP address of the computer from where the message originated.
  2. The on-premise SMTP relay software which received the message.
  3. Receiving the message by the Exchange Online server and re-routing it for outbound delivery.
  4. Finally, the delivery of the message from Office 365 to google.com.

From the above workflow, you can confirm that the message passed through the SMTP relay Office 365 as intended.

Join the thousands of organizations that use DuoCircle


Find out how affordable it is for your organization today and be pleasantly surprised.

Interested in our Partner Program for MSPs and VARs? Visit Our MSP Partner Program.

Pin It on Pinterest