Configure IIS as SMTP relay server for Office 365

By: Emiley J Emailed: 1605 times Printed: 2075 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

While migrating to Office 365, one of the issues you will face (and often forgotten) is to support legacy applications or websites that send out emails. For example, a feedback page on the customer website, will have to send an email by connecting to the SMTP server. Or another common scenario is when you have Printers, these printers usually will send emails after scanning, or after receiving a fax etc.. Here is a solution.

After migrating to Office 365 and you remove your on-premise exchange server, you will no longer have any SMTP server to point to. Therefore you can point them to Office 365. The only problem is that Office 365 uses TLS. Therefore some legacy applications may not support it. To resolve this issue you can configure one of your IIS servers to act as an SMTP relay server, so that your printer or applications can point to this IIS server for sending out emails, but your IIS server will just relay these emails to Office 365 server for sending out. The steps below explain how to configure your IIS to act as SMTP relay server for Office 365.

To configure Internet Information Services (IIS) so that your LOB programs can use the SMTP relay, follow these steps:

  1. Create a user who has an Exchange Online mailbox. To do this, use one of the following methods:
    • Create the user in Active Directory Domain Services, run directory synchronization, and then activate the user by using an Exchange Online license.
      Note The user must not have an on-premises mailbox.
    • Create the user by using the Office 365 portal or by using Microsoft Online Services PowerShell Module, and then assign the user an Exchange Online license.
  2. Configure the IIS SMTP relay server. To do this, follow these steps:
    1. Install IIS on an internal server. During the installation, select the option to install the SMTP components.
    2. In Internet Information Services (IIS) Manager, expand the Default SMTP Virtual Server, and then click Domains.
    3. Right-click Domains, click New, click Domain, and then click Remote.
    4. In the Name box, type *.com, and then click Finish.
  3. Double-click the domain that you just created.
  4. Click to select the Allow incoming mail to be relayed to this domain check box.
  5. In the Route domain area, click Forward all mail to smart host, and then in the box, type the mailbox server name.
  6. Click Outbound Security, and then configure the following settings:
    1. Click Basic Authentication.
    2. In the User name box, type the user name of the Office 365 mailbox user.
    3. In the Password box, type the password of the Office 365 mailbox user.
    4. Click to select the TLS encryption check box, and then click OK.
  7. Right-click the Default SMTP Virtual Server node, and then click Properties.
  8. On the Delivery tab, click Outbound Connections.
  9. In the TCP Port box, type 587, and then click OK.
  10. Click Outbound Security, and then configure the following settings:
    1. Click Basic Authentication.
    2. In the User name box, type the user name of the Office 365 mailbox user.
    3. In the Password box, type the password of the Office 365 mailbox user.
    4. Click to select the TLS encryption check box, and then click OK.
  11. On the Access tab, click Authentication, click to select the Anonymous access check box, and then click OK.
  12. On the Relay tab, select Only the list below, type the IP addresses of the client computers that will be sending the email messages, and then click OK.

Office365 Home | All Office365 Tutorials | Latest Office365 Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Emiley J
Password must include both numeric and alphabetic characters - Magento
What is Hadoop?
Returning multiple values from a web service
Tomcat and httpd configured in port 8080 and 80
Java Webservices using Netbeans and Tomcat
Java WebService connected to Database
How to Deploy a Java Web Service
Call a webservice in Java
Java WebService - Create your first web service in Java
package javax.jws does not exist
Getting Started with Android
HTML5 Location - getCurrentPosition() in HTML5
HTML5 Canvas - Using Canvas in HTML5
HTML5 - Introduction
HTML5 Video - Handling video in HTML5

More Tutorials in Office365
ADFS and ADFS Proxy in Windows Server 2012
365 office login (office 365 login)
Configure SSO for a domain with ADFS - Convert a domain to a federated domain in Office 365
What is Ofice 365 Home Premium
What is Office 365 Small Business Premium?
What is Office 365 Midsize Business Plan?
Migration from on-premise exchange 2003 to Office 365
Create Word, Excel, PowerPoint using Office Web Apps in Office 365
On-premise Exchange and Lync Online integration
Email limits and message limitations in Office 365
Comparison: SharePoint Online Plan 1 vs SharePoint Online Plan 2
Migrating SharePoint WSS2.0 site to SharePoint Online and Backup the SharePoint Online
Configure Outlook Manually for Office 365
Directory Synchronization tool in Office 365
Is autodiscover CNAME a must in Office 365

More Latest News
Most Viewed Articles (in Office365 )
Making your Alias email as 'Send As' in Office 365
Configure IIS as SMTP relay server for Office 365
Comparison: SharePoint Online Plan 1 vs SharePoint Online Plan 2
Change Dirsync synchronization frequency
xxxx cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
Steps to Create Shared Mailbox in office 365
Change primary e-mail address of a Office 365 user or group
How to configure Outlook in a staged migration of Office 365
Setting up Office 365 in Android phones and tablets
Adding and deleting new users in Active Directory when DirSync is running - Office 365
Myths about Directory Synchronization in Office 365
Configure Outlook Manually for Office 365
Email limits and message limitations in Office 365
Create Word, Excel, PowerPoint using Office Web Apps in Office 365
What is Ofice 365 Home Premium
Most Emailed Articles (in Office365)
Is autodiscover CNAME a must in Office 365
Change Dirsync synchronization frequency
xxxx cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
On-premise Exchange and Lync Online integration
Migration from on-premise exchange 2003 to Office 365
What is Ofice 365 Home Premium
Outlook Live couldn't connect to the IMAP server.
Directory Synchronization tool in Office 365
Making your Alias email as 'Send As' in Office 365
An Outlook Live mailbox wasn't found for the user.
The user's Outlook Live mailbox is full.
Change primary e-mail address of a Office 365 user or group
Error: "the current user is required to be a builtin\administrator directory sync - Office 365 Directory Sync
How to configure Outlook in a staged migration of Office 365
Configure IIS as SMTP relay server for Office 365