Many services and apps require some kind of email server in order to send you email notifications, warnings, errors. Windows Server 2012 doesn`t pack Exchange Server with it, but there is simple solution for sending emails from Windows Server 2012 and here is the tutorial for setting it up.
Prerequisite for this tutorial is installed IIS with IIS 6.0 Management Tools
Search | Server Manager | click on Server Manager
Click on Manage | Add Roles and Features |Next
Role-based of feature-based installation | Next
Select server | Next
Next | (Select Web Server and all under Management tools if you don`t already have IIS installed)
Select SMTP Server under Features
New Window will pop-up |Add Features
Next
Install
Success | Close
Back to search – enter IIS and then click on Internet Information Services (IIS) 6.0 Manager
Expand your local server and right click on SMTP | click on Properties
General tab |IP address – select local machine IP address and enable logging |Apply
Access Tab | click on Connection button
Click on Only the list below |Add
Enter IP of the computer you want to be able to access to SMTP service (you will define all local IPs here that you want to access your SMTP)
OK
Now, back to Access tab | click on Relay button
Same procedure as for Connection |OK |Apply
Delivery tab |click on Advanced button
Under fully-qualified domain name enter name of external mail server. If you have the need – you`ll also enter smart host name. After you’re done – OK |Apply |OK
Last stop is the firewall
Enter Firewall in search |select Windows Firewall with Advanced Security
!In some scenarios, you`ll also have to define Outbound Firewall Rule (same procedure as described here for inbound rule)
Right click on Inbound Rules | New Rule
Select Port | Next
TCP | Specific Local ports: enter 25 | Next
Allow the connection | Next
I`ll open my SMTP port to all instances, Public interface is not recommended, so choose wisely and think about what you want to achieve. This is my test lab, so I don`t have any security issues with it and want to test some scenarios. Next
Write the Name and description for your rule | Finish
Rule is created
Go to Control Panel | Administrative Tools | Services | find Simple Mail Transfer Protocol (SMTP) and set startup to Automatic (right click on it – Properties – Startup Type – Automatic)
Restart service (or even better – server is you can) and test your SMTP with application or service you want notifications from.