Add SMTP Windows Server 2016


Most may not realize that there is actually a free SMTP server builtin to Windows Server all the way back to Windows 2003 and is IIS 6 technology (I know, try to suppress your nausea).  The SMTP server is a feature that can be added to modern Windows Server versions via the Server Manager.  Out of curiosity and due to working on a project recently utilizing the SMTP server on a Windows 2012 box, I wanted to see if the SMTP server was still an option in Windows Server 2016 TP4 and the answer is yes.

Installing the SMTP server

This is a feature found in the Add Roles and Features Wizard and is simply listed as SMTP Server.

smtp2016_01-300x214 Add SMTP Windows Server 2016

smtp2016_02-300x213 Add SMTP Windows Server 2016

By default, the feature wizard will add the Management tools for IIS 6 since this is an IIS 6 technology.

smtp2016_03-300x214 Add SMTP Windows Server 2016

smtp2016_04-300x213 Add SMTP Windows Server 2016
smtp2016_05-300x213 Add SMTP Windows Server 2016
smtp2016_06-300x214 Add SMTP Windows Server 2016

A reboot will not be prompted for adding this feature.

Using the SMTP Server

The SMTP Server is administered through the IIS 6 Management Console.  An easy way to get there is to go to a run or command prompt and type inetmgr6.exe.  You will see the IIS 6 SMTP Virtual Server manager as show below.  If you right click on SMTP Virtual Server, you get a configuration box where you can configure most everything affecting mailflow.

smtp2016_07-300x233 Add SMTP Windows Server 2016

One of the more important areas of the configuration is under Delivery and Advanced where you will see the Advanced Delivery options.  Here is where you configure your mail domain.

smtp2016_08-258x300 Add SMTP Windows Server 2016

Testing mailflow

Using powershell we can test mailflow from our SMTP server using the send-mailmessage commandlet.  By default however, the server is not set to allow any open relays out of the box.

If you run the send-mailmessage commandlet from the server itself, you need to add the server’s assigned IP address to the allowed to relay list before you test.  Below is the default configuration.

smtp2016_09-1-274x300 Add SMTP Windows Server 2016

After you have added the appropriate IP address, you can open up a powershell prompt and use the following to test SMTP relay

Final Thoughts

The SMTP relay included in Windows Server from 2008 forward is a no frills SMTP relay that doesn’t include many options, however, if you are looking for SMTP functionality for an application or for testing, it can come in very handy.  It is good to see this feature is still hanging around in Windows Server 2016.