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.
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.
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.
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.
After you have added the appropriate IP address, you can open up a powershell prompt and use the following to test SMTP relay
send-mailmessage -from "<[email protected]>" -to "John Doe <[email protected]>" -subject "Test" -body "Testing" -smtpserver 192.168.57.86
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.