Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to set up Exchange Online as an SMTP relay


View products that this article applies to.

Introduction

This article describes how to set up Microsoft Exchange Online as a Simple Mail Transfer Protocol (SMTP) relay to send email messages to remote domains and to users in your Office 365 organization.

You may want to do this in the following scenarios:
  • You no longer have an on-premises messaging environment, such as Microsoft Exchange Server.
  • You have on-premises line-of-business (LOB) programs or devices (for example, printers, faxes).
  • The LOB programs and devices must be able to send email messages to remote domains and to your migrated cloud mailboxes.
The instructions in this article do not apply to organizations that use a hybrid configuration. In a hybrid configuration, your organization is already set up to deliver mail to the Internet by using Exchange Online.

These instructions also do not apply to applications or devices that can make their own SMTP connection through an Internet connection. For example, rich clients such as Outlook can connect directly to a remote SMTP server through the Internet and do not require a local SMTP server.

Requirements

  • Your on-premises domain must be added as an accepted domain in Office 365. For example, if the account that you're relaying from is bob@tailspintoys.com, you must add tailspintoys.com as an accepted domain in Office 365.
  • Your on-premises account must also be either an Exchange Online-licensed user in Office 365 or an alternative email address of an Exchange Online-licensed user. For example, if the account that you're relaying from is printer@tailspintoys.com and you want to relay through bob@contoso.com (an Office 365 user), you must add printer@tailspintoys.com as an alternative address to bob@contoso.com.

↑ Back to the top


More information

Set up Exchange Online as an SMTP relay in Windows Server

Step 1: Install Internet Information Services (IIS)

In Windows Server 2012
  1. In Server Manager, select Add Roles.
  2. On the Before you begin page in the Add Roles Wizard, click Next.
  3. On the Select Installation Type page, select Role-based or Feature-based installation.
  4. On the Select destination server page, click Select a server from the server pool, and then select the server that will be running SMTP services. Then, click Next.
  5. On the Select Server Roles page, select Web Server (IIS), and then click Next. If a page that requests additional features is displayed, click Add Features, and then click Next.
  6. On the Select Role Services page, make sure that Basic Authentication under Security is selected, and then click Next.
  7. On the Confirm Installation Steps page, click Install.
In Windows Server 2008 R2
  1. In Server Manager, select Add Roles.
  2. In the Add Roles Wizard, on the Before you begin page, click Next.
  3. On the Select Server Roles page, select Web Server (IIS), and then click Install.
  4. Click Next until you get to the Select Role Services page.
  5. In addition to what is already selected, make sure that ODBC Logging, IIS Metabase Compatibility, and IIS 6 Management Console are selected, and then click Next.
  6. When you're prompted to install IIS, click Install. You may have to restart the server after the installation is finished.

Step 2: Install SMTP

  1. Open Server Manager, and then do one of the following, as appropriate for your situation:
    • In Windows Server 2012, click Add Roles and Features
    • In Windows Server 2008 R2, click Add Roles and Features.
  2. Do one of the following, as appropriate for your situation:
    • In Windows Server 2012, in the Add Roles and Features wizard, click Server Selection, make sure that the server that will be running the SMTP server is selected, and then click Features. On the Select Features screen, select SMTP Server. You may be prompted to install additional components. If this is the case, click Add Required Features and then click Next.
    • In Windows Server 2008, in the Select Features window, select SMTP Server. If you are prompted to install additional components, click Add Required Features and then click Next.
  3. Click Install.
  4. After the installation is finished, you may have to start the SMTP service by using the Services Microsoft Management Console (MMC) snap-in (Services.msc).

Step 3: Set up SMTP

  1. Do one of the following:
    • In Windows Server 2012, open Server Manager, click Tools, and then click Internet Information Services (IIS) 6.0.
    • In Windows Server 2008, click Start, click Administrative Tools, click Internet Information Services (IIS) 6.0 Manager.
  2. Expand the current server, right-click the SMTP Virtual Server, and then click Properties.
  3. On the General tab, click Advanced, and then click Add.
  4. In the IP Address box, specify the address of the server that's hosting the SMTP server.
  5. In the Port box, type 587, and then click OK.
  6. On the Access tab, do the following:
    1. Click Authentication and make sure that Anonymous Access is selected.
    2. Click Connection, select Only the List Below, and then specify the IP address of the server that's hosting SMTP.
    3. Click Relay, select Only the List Below, and then specify the IP address of the server that's hosting SMTP.
  7. On the Delivery tab, click Outbound Security, and then do the following:
    1. Select Basic Authentication.
    2. Enter the user credentials of the Office 365 user who you want to use to relay SMTP mail.
    3. Select TLS Encryption.
    4. Click Outbound Connections.
    5. In the TCP Port box, type 587, and then click OK.

Test SMTP relay services

You can test SMTP relay services without having to use a separate LOB application or device. To do this, follow these steps:
  1. Create a .txt file by using Notepad or another text editor. The file content should consist of the following:
    FROM: <source email address>
    TO: <destination email address>
    SUBJECT: Test email
    This is a test email sent from my SMTP server
    .
  2. Save the text file as Email.txt.
  3. Copy the Email.txt file to the C:\inetpub\mailroot\Pickup folder.
  4. After a short time, the file should be automatically moved to the C:\inetpub\mailroot\Queue folder. When the SMTP server delivers the message, the file is automatically deleted from the local folder.
  5. If the SMTP server cannot deliver the message, a nondelivery report (NDR) is created in the C:\inetpub\mailroot\Badmail folder. You can use this NDR to diagnose mail delivery issues.

↑ Back to the top


References

For more information, go to How to setup an SMTP relay in Office 365.

↑ Back to the top


Still need help? Go to the Office 365 Community website.

↑ Back to the top


Keywords: o365, o365a, o365022013, after, upgrade, o365062011, pre-upgrade, o365m, o365e, KB2600912

↑ Back to the top

Article Info
Article ID : 2600912
Revision : 19
Created on : 1/7/2014
Published on : 1/7/2014
Exists online : False
Views : 817