Create SMTP Relay for Office 365 with Windows Server 2012 Essentials 7

The Setup of Windows Server 2012 Essentials has a step “Set up email alert notification”. To my surprise TLS encryption is not an option and since TLS encryption is required by Office 365 we need to create a SMTP Relay before finishing this step. This is not a perfect solution, but a working solution. So if you have any better idea, let me know.

Determine Office 365 SMTP Settings

First we need to know the Office 365 SMTP settings:

Login to the Microsoft Online Services Portal > Choose Outlook > Click Questionmark (upper right corner) > Choose Info >  Look for SMTP settings and write down Server name.

Install Windows Server 2012 SMTP Relay

First of all make sure your logged in as an administrator.

Go the the start screen and type “Server Manager” (Not default available in Windows Server 2012 Essentials). Click on Manage and choose “Add roles and Features”.

Type Next > Next (Installation Type)> Next (Server Selection) > Next (Server Roles) > Features – Enable “SMTP Server” – Click Add Features (required for SMTP Server) > Next > Install > Close.

Configure Windows Server 2012 SMTP Relay

Go in Server Manager to Tools > Internet Information Services (IIS) 6.0 Manager > Right-click [SMTP Virtual Server #1] > Click “Properties” .

Click “Access” tab > Click Connection > Check “All except the list below” > OK > Click Relay > Check “All except the list below” > OK.

Click “Delivery” tab > Click “Outbound Security” > Check “Basic Authentication” > Type username and password of Office 365 user > Click “TLS encryption” > OK > Click “Outbound connections” > Change “TCP port” to 587 > OK > Click “Advanced” > Fill in “Smart host” with the name of the Office 365 SMTP server > OK > OK.

Warning! You have an open relay now. Use this setup to check the email notification system. When you see it’s fully functional go back to the “Access” tab and narrow down the “Connection” and “Relay” settings to the necessary systems. When no other system needs to relay, just check “Only the list below” and grant “127.0.0.1” access.

Configure Email Notifications Windows Server 2012 Essentials

Make sure that the “From email address” is equal to the adres of the user connecting to Office 365 in the SMTP Relay, otherwise Office 365 will block the connection.

SMTP Server name is : 127.0.0.1

This is my solution for the moment. If you have a better one, please let me know. As I said, this is a working solution, but not a perfect one.

7 thoughts on “Create SMTP Relay for Office 365 with Windows Server 2012 Essentials

  1. Reply John Dec 11,2012 04:13

    Nice workaround.

    It is indeed unfortunate that you can’t just choose TLS in the Essentials wizard and be done with it. That would be much more in the spirit of the product I think.

  2. Reply Dames Apr 7,2013 00:24

    Thanks for posting up your solution. I followed your instructions and had to add an extra step to get the relay working with exchange online:

    – SMTP Virtual Server #1 -> properties -> delivery tab -> outbound connections (bottom center) -> TCP Port 587.

    The exchange online SMTP is open on port 587. By default the IIS SMTP relay is set to make its outbound connections on port 25.

    • Reply Cesare Auteri Apr 8,2013 07:52

      Thanks for pointing out this omission. I had the setting done, but somehow I left it out of my notes.
      I’ve added it now to the post.

  3. Reply Bruno Almeida Feb 26,2014 01:52

    Thank you!

  4. Reply Brandon Aug 28,2014 17:33

    the ? no longer shows the smtp server info, we have used outlook.office365.com for setting up email profiles for outlook, will this work or how do you find the specific server name now?

  5. Reply Leo Feb 24,2015 20:02

    Thanks for these instructions, they helped me out to configured quota notifications in windows server 2012.

Leave a Reply

  

  

  

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.