SMTP stands for simple mail tranfer protocol. SMTP allows your emails to be sent from one mail server to another mail server. It works the application layer of TCP/IP. You will not be able to send your emails without SMTP on the server. Following are the steps to install and configure SMTP service on Windows Server 2016.
- Login to your Windows Server.
- Click on Windows and Server Manager.
- Click on Add Roles and Features and hit Next Button at before you begin page.
- At Installation Type, select Role-based or feature-based installation and click Next.
- Keep the default Select a server from the server pool and click Next Button.
- We don't need to install any Roles so click on Next.
- On Add Features Wizard, select SMTP Server. Clicking SMTP Server will prompt for the Dialogue box. Tick on Include Management tools and hit Add features Button
- Make sure IIS6 Management Console and Metabase Compatibility are selected and click on Install Button.
SMTP uses port 25 to relay the emails. We need to disable the open relay to prevent SMTP to send spam emails. Following are the steps to do that.
- Open IIS Manager 6 from the Administrative Tools.
- Right-click on SMTP Virtual Server and select on properties.
- Click on the Access tab and hit Relay Button.
- Select Only the list below inside Relay restrictions and click on the Add button.
- Enter the localhost IP address, 127.0.0.1 and click OK
- Hit Ok Again.
- Click on Connection Button and Repeat the steps from (4) to (6).
- Finally, Hit the OK Button at SMTP Properties Button.