Programming Tutorials

Configure IIS as SMTP relay server for Office 365

By: Emiley J in Office365 Tutorials on 2012-03-16  

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.





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Office365 )

Directory Synchronization tool in Office 365

Comparison: SharePoint Online Plan 1 vs SharePoint Online Plan 2

Configure IIS as SMTP relay server for Office 365

Copy Power Automate Flows from one environment to another

Moving changes from a development environment (sandbox) to a production environment in Dynamics 365

Microsoft Flow to sync data from SharePoint list update/delete records to Dataverse Table

ADFS and ADFS Proxy in Windows Server 2012

What is Office 365 Midsize Business Plan?

Migration from on-premise exchange 2003 to Office 365

Adding and deleting new users in Active Directory when DirSync is running - Office 365

Change primary e-mail address of a Office 365 user or group

The user's mailbox has already been migrated.

The user's Outlook Live mailbox is full.

Configure SSO for a domain with ADFS - Convert a domain to a federated domain in Office 365

Outlook Live couldn't connect to the IMAP server.

Latest Articles (in Office365)

Copy Power Automate Flows from one environment to another

Moving changes from a development environment (sandbox) to a production environment in Dynamics 365

Microsoft Flow to sync data from SharePoint list update/delete records to Dataverse Table

Steps to create Microsoft Flow to sync data from SharePoint list to Dataverse Table

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 Office 365 Small Business Premium?

What is Ofice 365 Home 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

Migrating SharePoint WSS2.0 site to SharePoint Online and Backup the SharePoint Online