SMTP Server Installation on Windows Server

Giteqa

In every organization, it may be necessary to write and receive letters, but it is not always possible to use mail services. For example, if you use Gmail to receive emails, it cannot be called completely secure. This is due to the fact that google may start working with failures at some point (this happens) or it may block your email address and, of course, using such services it is more difficult to send emails in certain situations.
What should I do if gmail or another mail server does not work? The answer is simple - you need to create your own mail server. But how to create your own mail server on Windows Server, we will discuss in this article.

Downloading the necessary libraries

To install the necessary components for the operation of our mail server, you will need to go to *Server Manager -> Add Roles & Features* We need to add to the server roles *Web Server (IIS)* this is necessary to work with SMTP

Next, we will add to *Features* *SMTP Server* it will allow us to send emails from the system.

After we have added all the necessary components, we need to wait for the installation.

After installation, restart the server for the changes to take effect.

Setting up SMTP

The server is restarted and we can proceed with the configuration to do this, go to *Server Manager->Tools->IIS Manager*

After the transition, we open our server and in the drop-down menu we see *SMTP Server* right-click and select properties.

After that, the *General* menu opened in front of us. Here we need to select the IP address of the server and also enable logs.

After that, go to the *Access* tab and here we allow anonymous connection using *Authentication*

And in the *Connection* item, select *Only the list below* and enter the IP address of the server and the addresses from where users will connect.

This is necessary so that no outsider can use your SMTP server


Next, go to the *Delivery* section, here we will need to enter the domain name. You can check its availability via the *Check DNS* button.

These are the basic SMTP server settings. Next, you just need to run it through PowerShell to do this, log in to this application and enter the following commands:

  • set-service smtpsvc -StartupType Automatic - automatic startup when the system is turned on
  • start-service smtpsvc - enabling smtp server
  • get-service smtpsvc - health check

After that, your SMTP server will be activated and you will be able to use it.

You can check emails along the way C:\inetpub\mailroot\Pickup this is where you can view all emails, as well as send via the pickup folder