Установить smtp сервер на windows

Вы можете установить SMTP сервер с помощью встроенных средств во всех версиях Windows Server. Такой SMTP сервер внутри организации может работать в качестве почтового релея, который должен принимать и пересылать через себя SMTP сообщения от различных устройств (к примеру, сендеров, сканеров, устройств СКД и пр.) и приложений (веб приложения, SQL Reporting Services, SharePoint), которым необходимо иметь возможность отправлять почту через SMTP сервер. Такой релей может пересылать сообщения на полноценные Exchange сервер или на публичные почтовые сервисы в Интернет типа Gmail, Mail.ru, Office 365 и т.д (ведь не всегда целесообразно разворачивать полноценную внутреннюю почтовую инфраструктуру на базе Microsoft Exchange Server или других почтовых служб).

В этой статье мы покажем, как установить, настроить и протестировать работу SMTP сервера на Windows Server 2012 R2, 2016 и 2019, который будет функционировать в качестве mail релея. Такой SMTP сервер не хранит почтовые сообщения и на нем отсутствуют почтовые ящики, он сможет только отправлять или пересылать почту.

Содержание:

  • Установка службы SMTP на Windows Server 2016/2012 R2
  • Настройка SMTP сервера на Windows Server
  • Автозапуск службы SMTPSVC
  • Проверка работы SMTP сервера на Windows Server

Установка службы SMTP на Windows Server 2016/2012 R2

SMTP сервер – это один из компонентов Windows Server, который можно установить через Server Manager. Для этого откройте консоль Server Manager Dashboard (servermanager.exe), перейдите в режим Add roles and features и на этапе выбора функций отметьте чекбокс у пункта SMTP Server. Для управления службой SMTP нужно установить консоли управления, которые входят в комплект роли Web Server IIS (вам будет предложено установить IIS Management Tools).

smtp сервер на windows server 2012 r2

Оставьте все предлагаемые опции роли Web Server (IIS) и запустите установку.

Компоненты веб сервера IIS

Также вы можете установить компонент SMTP сервера с помощью одной команды PowerShell:

Install-WindowsFeature smtp-server

После окончания установки компонентов может потребоваться перезагрузка системы.

Настройка SMTP сервера на Windows Server

Управляется SMTP сервер консоль управления Internet Information Services (IIS) Manager 6. Открыть эту консоль можно через Server Manager: Tools-> Internet Information Services (IIS) 6.0 Manager или командой inetmgr6.exe.

Консоль Internet Information Services (IIS) Manager 6В консоли IIS 6 Manager разверните ветку с именем сервера, щёлкните ПКМ по SMTP Virtual Server и откройте его свойства.

Свойства SMTP сервераНа вкладке General, если необходимо, выберите IP адрес, на котором должен отвечать SMTP сервер (если у сервера несколько IP адресов), и включите ведение логов Enable logging (чтобы сохранялась информация обо всех полученных письмах).

Адрес SMTP сервераЗатем перейдите на вкладку Access.

Настройки SMTP доступаЗдесь нажмите на кнопку Authentication и убедитесь, что разрешен анонимный доступ (Anonymous access).

SMTP аутентфикация - анонимный доступ

Вернитесь на вкладку Access и нажмите кнопку Connection. Здесь вы можете указать IP адреса устройств, которым разрешено отправлять почту через наш SMTP релей. Нужно выбрать опцию Only the list below и указать список IP адресов, не забыв самого себя (127.0.0.1).

Аналогичным образом настройте список разрешенных IP в настройках Relay (нажмите соответствующую кнопку). В этой секции указано каким IP адресам (или подсетям) можно пересылать почту через ваш SMTP сервер.

Ограничения на отправку через SMTP сервер по IP адресу

Примечание. Как правило, обязательно стоит включать эту опцию, как минимум ограничив список обслуживаемых устройств диапазоном IP адресов. В противном случае ваш SMTP сервер может использоваться спамерами и другими злоумышленниками как открытый релей для массовых почтовых рассылок.

Перейдите на вкладку Messages. Здесь указывается email, на который будут отправляться копии всех NDR отчетов (Send copy of Non-Delivery Report to:). Также здесь можно указать ограничения на максимальный размер писем (Limit message size KB) и количество получателей (Limit number of recepients per message).

Лимиты SMTP сообщенийПерейдите на вкладку Delivery:

Настройки параметров доставки

Затем нажмите на кнопку Outbound Security. Здесь указывается, как нужно авторизоваться на почтовом сервере, на который ваш SMTP-сервере будет пересылать (relay) всю почту. К примеру, если вся почта будет отправляться на почтовый сервер Gmail и уже с него пересылаться адресатам, вам нужно выбрать тип аутентификации Basic authentication, указав в качестве пользователя и пароля данные для доступа к почтовому ящику на сервисе Gmail (в настройках аккаунта Google нужно разрешить отправку через smtp сервера gmail).

Параметры аутентифкации на внешних системах

Затем нажмите на кнопку Advanced.

Advanced DeliveryЗдесь указывается FQDN имя вашего SMTP сервера. Нажмите кнопку Check DNS, чтобы проверить корректность записи в DNS.

The domain name is valid

Если сервер должен пересылать почту внешнему smtp серверу, нужно указать его имя в поле Smart host (к примеру smtp.gmail.com или smtp.office365.com).

Некоторые внешние почтовые сервера принимает почту только при использовании защищенного SMTP соединения с помощью TLS Encryption (используется порт TCP 587). Это настраивается в разделе Delivery-> Outbound Security и Outbound Connections. Ознакомитесь с документацией вашего почтового провайдера.

Сохраните настройки SMTP сервера и перезапустите ваш виртуальный SMTP сервер для применения изменений.

Примечание.

  1. Настройки DNS критичны с точки зрения работоспособности почтовой системы. Если ваш SMTP сервер не может корректно разрешить DNS имена доменов, на которые он пытается отправить письма, доставка не удастся.
  2. Если ваш сервер сам будет отправлять почту в другие домены, важно, чтобы для вашего адреса была сформирована правильная PTR запись для разрешения обратных DNS запросов. PTR запись для белого IP адреса должна указывать на FQDN имя. В противном случае большинство внешних smtp серверов не будут принимать от вас почту, считая ваш сервер спамерским.

Автозапуск службы SMTPSVC

Осталось настроить автозапуск службы SMTP сервера. Быстрее всего это сделать из командной строки PowerShell:

set-service smtpsvc -StartupType Automatic

Запустим службу:

start-service smtpsvc

Проверим, что запущена служба SMTPSVC :

get-service smtpsvc

Status Name DisplayName
—— —- ————
Running smtpsvc Simple Mail Transfer Protocol (SMTP)

set-service smtpsvc - управление службой SMTP

Проверка работы SMTP сервера на Windows Server

Ну и последнее, что осталось сделать, проверить работу созданного SMTP сервера. Проще всего это сделать, создав на рабочем столе текстовый файл smtp-test-email.txt и скопировав в него следующий текст, заменив имя отправителя и получателя на ваши.

From: [email protected]
To: [email protected]
Subject: Email test

This is the test email

Тестирование отправки smtp сообщений

Скопируйте файл smtp-test-email.txt в каталог C:\inetpub\mailroot\Pickup. SMTP сервер следит за появлением файлов в этой каталоге и при обнаружении файла прочтет его содержимое и попытается отправить письмо с данной темой и текстом адресату, указанному в разделе To:.

Проверьте ящик получателя, в него должно прийти такое письмо.

Тестовое письмо

Совет. Протестировать работу SMTP сервера можно и из командой строки telnet, скрипта vbs или PowerShell:

Send-MailMessage -SMTPServer localhost -To [email protected] -From [email protected] -Subject "Email test" -Body "This is the test email sent via PowerShell"

Если вы хотите, чтобы вы включили Basic Authentication (Обычная проверка подлинности) для авторизации всех ваших SMTP клиентов (вместо анонимной аутентификации), вы можете отправить письмо с smtp-аутентификацией через telnet следующим образом.

Также убедитесь, что на вашем SMTP сервере не блокируется порт TCP 25 при удаленном подключении (локальным файерволом, антивирусом или межсетевым экраном). Проще всего это сделать с компьютера Windows, IP адрес которого добавлен в разрешенные. Проверку доступности порта можно выполнить с помощью командлета Test-NetConnection:

Test-NetConnection smtpsrv1.name.local –port 25

Если 25 порт блокируется, проверьте настройки Windows Firewall, антивируса и аппаратных межсетевых экранов.

Итак, вы настроили собственный почтовый SMTP релей на Windows Server 2016/2012 R2 и протестировали отправку писем через него.

Почтовый сервер – это устройство, при помощи которого происходит доставка электронных сообщений от отправителя к получателю. Собственно, это и следует из его названия. В данной статье рассмотрим, как происходит установка и базовая настройка почтового сервера на VPS с операционной системой семейства Windows Server, а также на виртуальном сервере, работающем на Ubuntu 20.04.

Установка сервера SMTP на Windows Server

На серверах, работающих под управлением операционных систем Windows, для передачи почтовых сообщений часто используется протокол SMTP. В Windows Server служба SMTP является одним из компонентов операционной системы.

Для корректной отправки почтового сообщения от имени домена, к которому будет привязан сервер SMTP, нам необходимо иметь доменное имя. При этом в настройках домена должна быть указана A-запись, содержащая IP-адрес VPS. В нашем примере мы будем использовать имя домена my-domain.host.

Установку почтового сервера нужно будет начать именно с добавления необходимых компонентов. Для этого запустите Server Manager, перейдите ManageAdd Roles and Features.

Добавление ролей и компонентов - Установка и настройка почтового сервера

В открывшемся окне нажмите Next.

Мастер добавления ролей и компонентов - Установка и настройка почтового сервера

Далее выберите опцию Role-based or feature-based installation, после чего нажмите Next.

Выбор установки ролей и компонентов

В следующем окне укажите сервер, на который будет производиться установка новых компонентов, либо просто нажмите Next, если в вашем пуле серверов одна-единственная запись.

Выбор сервера

На следующем шаге активируйте строку Web Server (IIS), после чего нажмите Add Features.

Добавление компонент веб-сервера (IIS)

Далее нажмите Next.

Выбор установки веб-сервера (IIS)

После чего отметьте строку SMTP Server и нажмите Add Features.

Добавление компонентов сервера SMTP

И нажмите Next.

Выбор установки сервера SMTP

Далее ещё раз нажмите Next.

Роли веб-сервера (IIS)

В следующем окне снова нажмите Next.

Роли веб-сервера (IIS)

Для запуска установки выбранных компонентов нажмите Install.

Установка выбранных ролей и компонентов - Установка и настройка почтового сервера

Настройка сервера SMTP

На следующем этапе необходимо будет настроить сервер SMTP. Для чего в Server Manager перейдите ToolsInternet Information Services (IIS) 6.0 Manager.

Запуск диспетчера IIS - Установка и настройка почтового сервера

В открывшемся окне менеджера IIS раскройте ветку вашего сервера и на строке SMTP Virtual Server нажмите правую кнопку мыши, после чего перейдите в Properties.

Свойства сервера SMTP

Далее в строке IP address: необходимо выбрать IP-адрес вашего сервера и активировать опцию Enable logging.

Указание IP-адреса включение ведения журналов

Во вкладке Access нажмите кнопку Authentication...

Вкладка Доступ

В открывшемся окне активируйте опцию Anonymous access. Активация данной опции нужна, чтобы пользователи и приложения смогли бы использовать сервер SMTP анонимно. Позже можно будет настроить более безопасную аутентификацию, пока же нажмите OK.

Включение анонимного доступа

Далее в разделе Connection control нажмите кнопку Connection...

Настройка управления подключением

В окне Connection установите переключатель на Only the list below и при помощи кнопки Add... добавьте IP-адрес вашего VPS. После чего нажмите OK.

Разрешение доступа для IP-адреса вашего VPS

Точно такую же настройку необходимо проделать в разделе Relay restrictions. Для чего нажмите кнопку Relay... и добавьте IP-адрес вашего сервера установив переключатель в Only the list below.

Настройка ограничений ретрансляции

После чего перейдите во вкладку Delivery и нажмите Advanced...

Настройка доставки

Здесь в строку Fully-qualified domain name: необходимо внести имя вашего домена, в нашем примере это – my-domain.host.

Дополнительная настройка доставки

Для того, чтобы проверить корректность данной настройки, нажмите кнопку Check DNS.

Проверка корректности имени домена - Установка и настройка почтового сервера

Далее сохраните все внесённые в настройки изменения при помощи кнопки OK.

Также необходимо указать корректное имя домена в ветке Domains.

Редактирование имени домена - Установка и настройка почтового сервера

На следующем шаге нужно активировать функцию автоматического запуска сервера SMTP. Для этого запустите командную строку PowerShell и выполните следующие команды для запуска службы:

set-service smtpsvc -StartupType Automatic
start-service smtpsvc

Чтобы убедиться, что служба запущена, необходимо выполнить ещё одну команду:

get-service smtpsvc

Вывод данной команды должен выглядеть примерно следующим образом:

Вывод команды get-service smtpsvc - Установка и настройка почтового сервера

Теперь там же, в командной строке PowerShell, при помощи следующей команды отправьте сообщение на свою электронную почту:

Send-MailMessage -SmtpServer my-domain.host -To your@email.address -From mail@my-domain.host -Subject "Message Subject" -Body "Message Body"

Здесь:

  • my-domain.host – имя домена, с которого будет производиться отправка сообщения;
  • your@email.address – адрес электронной почты, на который будет отправлено сообщение;
  • mail@my-domain.host – этот электронный адрес будет указан в сообщении как адрес отправителя;
  • Message Subject – тема письма;
  • Message Body – тело письма.

После чего проверьте свою почту, на которую должно прийти сообщение от вашего почтового сервера.

Установка и настройка Postfix на Ubuntu 20.04

Для операционной системы Ubuntu существует довольно популярный почтовый сервер – Postfix. Для установки Postfix мы будем использовать виртуальный сервер, работающий на Ubuntu 20.04. При этом на VPS должны быть произведены работы по первоначальной настройке, описанные в соответствующей статье нашего справочника.

Также, для работы Postfix нужен домен с привязанной A-записью, которой является IP-адрес вашего виртуального сервера.

Плюс ко всему, необходимо соотнести имя домена с именем сервера и его IP-адресом. Для этого запустите следующую команду:

$ sudo hostnamectl set-hostname ubuntu-server

Здесь, ubuntu-server – имя нашего сервера, вместо которого вы можете использовать своё.

Теперь при помощи текстового редактора откройте файл /etc/hosts:

$ sudo nano /etc/hosts

В данный файл добавьте строку:

XXX.XXX.XXX.XXX my-domain.host ubuntu-server

В данном случае:

  • XXX.XXX.XXX.XXX – IP-адрес вашего сервера;
  • my-domain.host – имя вашего домена;
  • ubuntu-server – имя вашего сервера.

Теперь запустите установку Postfix и почтового пакета mailutils:

$ sudo apt install postfix mailutils

В процессе установки система попросит вас выбрать тип конфигурации. Необходимо указать Internet Site:

Выбор типа конфигурации - Установка и настройка почтового сервера

Также установщик попросит согласиться с именем домена, в отношении которого производится настройка почтового сервера. В нашем случае это будет my-domain.host.

Подтверждение имени домена при установке Postfix

По окончании установки можно попробовать с нашего почтового сервера отправить тестовое сообщение. Команда для отправки сообщения выглядит следующим образом:

$ echo "Message Body" | mail -s "Message Subject" your@email.address

В данной команде:

  • Message Body – тело письма;
  • Message Subject – тема письма;
  • your@email.address – адрес электронной почты, на который будет отправлено сообщение.

Проверьте свой почтовый ящик (в нашем примере это – your@email.address), на который должно прийти отправленное из Postfix сообщение.

All businesses use emails for internal and external communication and promotion. Many businesses rely heavily on email as their primary method of internal communication. Examples include emails to customers, business partners, staff, upper management, and other interested parties. Organizations that regularly send or receive large numbers of emails can benefit from dependable SMTP services

SMTP, or the Simple Mail Transfer Protocol, streamlines and accelerates bulk email processing for enterprises. To avoid being filtered out as spam, an SMTP should be able to process large numbers of emails with a single action. This is a helpful addition because it prevents businesses from paying for pricey email server administration software.

However, SMTP must be installed and configured because it is not included with Windows servers by default. Therefore, this article aims to instruct readers on how to install SMTP server on windows. You can also Buy windows VPS and install an SMTP server on it. If you are a Linux user, be sure to check out our thorough guide on how to install smtp server on Ubuntu.

What precisely is an SMTP server?

Email transmission is handled by a computer or program called an SMTP server. It operates in accordance with SMTP (Simple Mail Transfer Protocol). When an email is sent from a client, it is received by an SMTP server. The messages are then relayed to the incoming mail server via another SMTP server.

How does an SMTP server work?

If you want to install SMTP server on windows, first, we need to know the SMTP server’s place in the email sending process and its essential processes.

The SMTP connection is initiated by a mail user agent (MUA), your email client, or an app. It ends at the SMTP server for your domain. An SMTP handshake occurs here. The standard SMTP port number for this connection is 25. Other ports, such as 465, 587, and 2525, may be used instead in specific circumstances. Our post on SMTP ports provides more information. The SMTP session starts when the connection is made.

The client provides the server with the email addresses of the sender and receiver, the email’s body, and any attachments.

The mail transfer agent (MTA) performs a domain name similarity check between the sending and receiving domains. If so, the recipient’s POP3 or IMAP server will receive the message instead of their inbox. If the domains differ, the SMTP server will need to contact the DNS.

The DNS reveals the receiver’s network address (IP address).

The email is transmitted from the sender’s SMTP server to the recipient’s SMTP server. The email will be placed in an SMTP queue if the recipient’s server is unavailable (down, busy, etc.). Before the emails reach their destination, they are temporarily kept in this buffer. It is also possible to redirect the email to a secondary server.

The inbound email is checked for legitimacy by the recipient’s SMTP server. If the domain and username are valid, the server will deliver the message to the POP3 or IMAP server specified in the email header.

Key SMTP Server Features

Before you install SMTP server on windows, the following are some of the SMTP Server’s features:

  • This server operates in “relaying mode,” which forwards incoming emails from one SMTP server to another before they are sent to the intended recipient.
  • VRFY (verify) is a command used in Address Debugging – SMTP. In other words, it makes sure an email address is real without actually using that address.
  • The SMTP server occasionally receives email from a non-local mailbox and forwards it to the correct recipient.
  • The initial SMTP server included a command called “turning” that switched the sender and recipient roles. Some SMTP clients still have support for it, despite its low prevalence.
  • SMTP servers can be set up to act as email gateways. These gadgets adapt TCP/IP messages for use with another email protocol.
  • The SMTP server also has an EXPN (Expand) command for growing mailing lists. In addition, it identifies each email address in a mailing list.

Benefits of Using an SMTP Server

Here are some of the advantages of using SMTP Server:

  • The Top Email Marketing Software – You can reach a wide variety of customers and clients worldwide with the help of bulk email marketing. These emails can be sent and received since they are sent over an SMTP server.
  • Reliable – It might be time-consuming to double-check that all the information in an email is correct and that it will reach its intended audience. Time spent sending an email is for naught if it is in the spam folder. On the other hand, while using an SMTP server, you need to examine the message’s contents. This server deals with the rest automatically.
  • Assisting Hand – The SMTP server’s skilled assistant will handle any questions you may have. They guarantee assistance up until the point of service implementation. They offer answers to issues that may arise later on.
  • Quicker – Quicker transactional email delivery is possible with the help of an SMTP server. This prevents clients from waiting for important information like passwords and order confirmations.
  • Your email marketing campaign’s effectiveness depends on the analytics and data regarding the email hitting the inbox of clients; therefore, be sure to provide reports and track emails. An SMTP server monitors outgoing emails until their intended recipients receive them.
  • Spam newsletters and emails are blocked before they even reach the inbox of the intended receiver. They’re thrown away without ever being opened. The SMTP server guarantees that all emails are delivered successfully.

Prerequisites to install SMTP server on windows

  • A server running Microsoft Windows.
  • An administrative user account.

Please be aware that Windows 11, Windows 10, and Windows 8 are not able to function as SMTP Servers. The SMTP server is a part of Windows Server’s IIS (Internet Information Services). The SMTP email client is included with the client operating systems but not an SMTP server.

Step By Step Guide on How to Install SMTP Server on Windows

Here we are at the heart of this post, where we learn how to install and configure SMTP server on windows.

Step 1: Set up SMTP

First, access the Windows Server Manager interface.

setup smtp

Click the “Add Roles and Features” button. Now you will observe the “before you start”.

setup smtp

Press the Next button. The window asking you to choose an installation type will appear.

setup smtp

Click the Next button after choosing between role-based and feature-based installation. You should now be at the page where you can select your final server.

setup smtp

Click the Next button after selecting a server from the server pool. The Choose server roles screen needs to load.

setup smtp

Click the Next button after selecting the Web Server (IIS) role. The choose features screen must now be visible.

setup smtp

Click the Next button after choosing the SMTP server options. The screen for the web server role must now be visible.

setup smtp

Select the Next option. Now “Select Role Services” is in front of you.

setup smtp

Select the Next option. The screen to verify the installation should appear.

Hit the Install button to begin the setup. You’ll need to give the installation some time to complete. Restarting the server after installation is complete is required.

Step 2: Configure the SMTP Service

The SMTP service must be configured from the IIS management after installation. To set up your SMTP server, please use the instructions below.

First, access the Internet Information Services (IIS) 6.0 Manager using the Server Manager’s Tools menu. The IIS Manager window must now be visible.

configure smtp

Choose “Select SMTP Virtual Server from the context menu.” The next screen should appear.

configure smtp

Select “Properties” from the menu. The next screen should appear.

configure smtp

Click the Access tab after selecting your IP address. The next screen should appear.

configure smtp

Now tap the Link. The next screen should appear.

configure smtp

Click the OK button after entering the IP address of your permitted computer. Next, select the Relay option. The next screen should appear.

configure smtp

Enter the IP address of the relay and hit the OK button. Then select the Delivery menu. The next screen should appear.

Click the Advanced option after completing the mandatory configuration. The next screen should appear.

configure smtp

After defining your external domain, select OK to save your settings.

Step 3: Set up a Firewall in Windows

The next step is to open the SMTP port on the Windows firewall to access it from outside hosts. To set up the firewall, please refer to the instructions below.

setup firewall in windows

First, access the Windows Firewall in the manner outlined below.

Second, select “New Rule” from the Inbound Rule context menu. The Rule Type screen needs to load.

setup firewall in windows

Third, choose the port you want to use, then press the Next button. Now you will see the “Protocol and Ports”.

setup firewall in windows

The fourth step is to specify the protocol and port number before proceeding. The Action screen should load.

setup firewall in windows

The fifth step is to click the Next button after choosing to allow the connection. The profile-selection screen will appear.

setup firewall in windows

Click the Next button after choosing your profile. The panel for entering a name should now appear.

setup firewall in windows

The final step in setting up your SMTP rule is to give it a descriptive name and then hit the Finish button.

You may now tailor email delivery with your Windows server to meet your needs.

We appreciate you reading our blog post on configuring a server to send and receive email with Windows SMTP.

FAQ

The ability to send and receive emails is the primary function of an SMTP server. To send emails from a Windows PC, you will need to install an SMTP server that communicates with your email provider’s server.

Enabling the «Simple Mail Transfer Protocol (SMTP)» function is required to install SMTP server on windows. This can be easily done by going to the «Add or Remove Programs» part of your Control Panel, by clicking on «Turn Windows features on or off,» and then selecting «Simple Mail Transfer Protocol (SMTP). After that, you can connect to your email provider by configuring the SMTP server settings.

Any email source that allows for SMTP authentication can be used with the Windows SMTP server. Several well-known email clients support SMTP authentication, including Gmail, Yahoo Mail, and Microsoft Outlook.

On Windows, access the «Internet Information Services (IIS) 6.0 Manager» and head to the «SMTP Virtual Server Properties» area to adjust the SMTP server settings. In this section, you can enter the information needed to connect to your email provider, such as the SMTP server name, port number, and authentication settings that can be changed after you install SMTP server on windows.

A free email testing tool, such as Mailtrap or SMTP Diag Tool, can be used to verify the SMTP server’s functionality on Windows. You can use them to test your SMTP server by sending test emails to it and seeing if they arrive at your ISP’s mail server. The SMTP server logs may contain information about connection problems or error messages.

Conclusion

In this guide we talked about the Windows SMTP service and its role in establishing an SMTP server. This tutorial should help you set up your own SMTP server on Windows. If you aren’t interested in setting up a full mail server, you can use the above configuration to send emails from your server. However, if you have any questions or clarifications, please comment them below. Thank you for reading, as always.

В данной статье мы объясним последовательность установки и настройки smtp-сервера на VPS под управлением ОС Windows.

SMTP-сервер предназначен для передачи электронных писем в сети Интернет и в локальной сети. Также может применяться для отправки системных сообщений и лог-файлов.

Установка
Прежде всего добавьте недостающие компоненты.

Выберите «Установка ролей и компонентов» и «Далее».

Отметьте необходимый сервер из пула.

Затем отметьте роль «Веб-сервер (IIS)». В новом окне нажмите «Добавить компоненты». Веб-сервер (IIS) включает консоли для управления службой SMTP.

Теперь в списке компонентов отметьте «SMTP-сервер». В новом окне нажмите «Добавить компоненты».

На следующем этапе следует принять настройки по умолчанию и провести установку. Перезагрузка сервера не нужна.

Настройка SMTP сервера
Через Internet Information Services (IIS) Manager 6 вы сможете управлять SMTP сервером. Для открытия IIS перейдите в диспетчер серверов и в меню в правом верхнем углу выберите раздел «Средства» -> «Диспетчер служб IIS 6.0».

Разверните ветку с именем сервера, отметьте SMTP Virtual Server и откройте его свойства.

На вкладке «Общие» отметьте ваш IP-адрес, на котором должен отвечать SMTP сервер, и включите ведение журнала, чтобы сохранять данные обо всей отправленной почте.

На вкладке «Доступ» в разделе «Управление доступом»нажмите кнопку «Проверка подлинности&rlaquo;. В новом окне выберите пункт «Анонимный доступ»: это обеспечит возможность всем пользователям сервера и приложения пользоваться SMTP-сервером.


Теперь в разделе «Управление подключением» нажмите кнопку «Подключение». В новом окне следует разрешить доступ к SMTP-серверу только определенным компьютерам (добавьте их в список и выберите тип подключения «Только компьютеры из списка ниже»).

Внимание: добавьте IP-адрес сервера, на котором настраивается SMTP-сервер!

Затем на вкладке «Доставка» нажмите кнопку «Дополнительно». В открывшемся окне в поле «Полное доменное имя» следует ввести ваше доменное имя или IP-адрес.


Учтите, что имя домена должно быть допустимым при проверке DNS.

Сохраните все изменения.

Автозапуск службы SMTPSVC
При включении сервера служба SMTP-сервера должна включаться автоматически, для этого нужно выполнить такие команды в командной строке:
set-service smtpsvc -StartupType Automatic
Включите службу:
start-service smtpsvc
Убедитесь, что служба SMTPSVC успешно работает:
get-service smtpsvc

Протестируйте SMTP сервер
Чтобы проверить правильность работы, создайте любой текстовый документ с расширением txt и внесите в него такие строки с указанием, от кого вы отправляете письмо и кому:

From: server@example.org
To: test@gmail.com
Subject: test
Some text

Внимание:

В качестве доменного имени в почтовом адресе отправителя указывайте ваше или ip-адрес, при этом имя почтового ящика может быть любым;
Отправленная почта попадает в спам, для предупреждения этого следует настроить SPF и/или DKIM для вашего домена.
Теперь перенесите созданный файл в директорию C:\inetpub\mailroot\Pickup. Файл исчезнет спустя короткое время. Проверьте полученное письмо.

Introduction

SMTP (Simple Mail Transfer Protocol) is a service that enables email exchange on the Internet and within a local network. To achieve that, SMTP interacts with the Mail Transfer Agent (MTA) and ensures the messages reach the intended recipients.

Mail servers and other message transfer agents usually use SMTP to send and receive email messages.

In this tutorial, you will learn to install and configure the SMTP server on Windows.

How to install and configure the SMTP server on Windows - a tutorial.

Prerequisites

  • A Windows Server operating system.
  • A user account with administrator privileges.

Note: Client operating systems like Windows 11, Windows 10, and Windows 8, do not have SMTP Server capabilities. Windows Server operating systems provide an SMTP server as part of the Internet Information Services (IIS). The client operating systems only provide the SMTP email client, which is not an SMTP server.

SMTP installation is a straightforward process on Windows Server operating systems. Use the Server Manager management console and follow the steps below to install SMTP.

Step 1: Add Roles and Features in Server Manager Dashboard

Open the Server Manager management console and select Dashboard in the left pane.

Opening the server manager dashboard in Windows Server.

From the Dashboard, select the Add roles and features option to start the wizard and install the SMTP server.

The Before You Begin screen appears, stating that the prerequisites for adding a role are:

  • Having a strong password on the Administrator account.
  • Configured network settings on the server.
  • That you have installed the latest security updates.

If all the prerequisites are met, click Next to continue the installation.

The welcome screen of the Add roles and features wizard.

Step 2: Select Installation Type

In the Installation type window, select Role-based or feature-based installation. Click Next to continue.

Selecting the installation type for SMTP server.

Step 3: Select Destination Server

Choose the Select a server from the server pool option and pick the desired server from the Server Pool to set the destination server. The Server Pool lists the servers you have added using the Add Server option in Server Manager. By default, the local server is selected.

Click Next to move on to the next step.

Choosing the destination server for SMTP installation.

Step 4: Select Server Role

The Select server roles screen allows you to select which features and roles to install. Keep the default selection and click Next.

Selecting which server roles to install.

Step 5: Select Features

The next step is to select which features to install. Scroll through the list to find and select SMTP Server. Click Next to proceed.

Selecting the SMTP server feature for installation.

Step 6: Install Missing Features

If the Remote Server Administration Tools and Web Server roles have not been previously installed, the wizard prompts you to install them. Check the Include management tools option and click Add Features to install them:

Installing missing features for SMTP.

Install Web Server Role

The wizard displays an information screen about the Web Server Role (IIS). Click Next to install the role.

Installing the Web Server role on Windows Server OS.

Install Role Services

Check all the services you want to install for the Web Server role. The default options are preselected.

Selecting which services to install along the Web server role.

Click Next to proceed to the final step when you finish selecting the services.

Step 7: Confirm Installation

The wizard displays a confirmation window with a summary of all the roles, services, and features about to be installed. Make sure that the Restart the destination server automatically if required option is checked and click Install to finish the installation.

Confirming the installation of SMTP and other required features.

When the installation completes, click Close to exit the installation wizard.

Configure SMTP on Windows

Configure the SMTP server using the Internet Information Services (IIS) Manager 6.0. Follow the steps in the chapters below.

Step 1: Open IIS 6.0

Open the IIS Manager 6.0 from the Server Manager dashboard.

Select the Tools option, and locate Internet Information Services (IIS) 6.0 Manager from the dropdown menu:

Opening the Internet Information Services 6.0 manager.

Step 2: Configure SMTP Virtual Server

In IIS Manager 6.0, expand the computer name and right-click [SMTP Virtual Server #1].

Select Properties from the dropdown menu.

Configuring the properties of SMTP virtual server.

Step 3: Configure Relay

The relay options allow you to relay emails through the SMTP virtual server.

Configure Server Access

1. In [SMTP Virtual Server #1] properties, click the Access tab and select the Relay button:

Setting the relay settings for SMTP.

2. Select the Add… option to set which computer is allowed to relay emails through the SMTP server.

Adding a computer to SMTP relay settings.

Select the Single Computer option and enter 127.0.0.1 to allow the localhost to relay emails through the SMTP server. You can also specify a group of computers using the Group of computers option.

Click OK to confirm the changes.

Entering the localhost IP address to relay settings.

Step 4: Configure Security Options

The Delivery tab of [SMTP Virtual Server #1] properties contains different settings related to the intervals of retrying to send outbound emails after a failed delivery, and different security options.

To configure the security options, click Outbound Security.

Configuring SMTP security options.

The pop-up window allows you to choose one of four options for securing your SMTP server:

  • Anonymous access. Disables SMTP server authentication since it doesn’t require an account name or password.
  • Basic authentication. Used when sending emails to a personal or exchange account. This option passes the account name and password as clear text, so make sure to use TLS encryption if you select this option.
  • Integrated Windows Authentication. Uses the Windows domain account name and password for authentication.
  • TLS encryption. Use TLS to secure the connection. This option requires you to install a valid SSL certificate on the server.
Selecting a security type for SMTP.

Note: Test core SMTP functionality with a personal e-mail or Exchange account by selecting Anonymous access. SMTP uses the AUTH command with Basic authentication, which can cause some e-mail providers to fail.

Step 5: Restart SMTP Server

Restart the SMTP Server to apply the changes. Right-click [SMTP Virtual Server #1], select Stop, and then select Start.

Restarting the SMTP server in Windows.

Test SMTP Server

Test the SMTP server configuration by sending an email message using the SMTP server. One of the ways to do that is to use telnet. Follow the steps below:

1. Press the Windows key and search for PowerShell.

2. Run the PowerShell app as Administrator.

3. Run the following command:

telnet localhost 25

4. Start the communication with the server by running:

EHLO server

5. Enter the email address you will use to send the email. The syntax is:

MAIL FROM: [sender_email_address@domain.com]

6. Enter the recipient email address. The syntax is:

RCPT TO: [recipient_email_address@domain.com]

7. Inform the SMTP Server you are ready to send the message by entering:

DATA

8. Enter the email subject:

Subject: Test Message

9. Press Enter twice to move on to the email body. Type in the message body and press Enter to finish.

10. Send the email by entering a period (.) and pressing Enter.

Testing the SMTP configuration using Telnet.

Check the recipient’s inbox to see if the email was delivered. If not, the message may still be in the SMTP Queue directory (C:\inetpub\mailroot\Queue).

Conclusion

This tutorial showed how to install and configure the SMTP server on Windows Server operating systems. An SMTP server allows you to exchange emails using the MTA, making it a great solution when you want to set up your own mail server.

Next, learn how to set up Postfix to use an external SMTP server, or learn to use the mail command in Linux.

  • Установить ssh server windows server 2019
  • Установить whatsapp на компьютер на русском для windows 10
  • Установить shareman бесплатно для windows 10
  • Установить viber на компьютер на русском для windows 10
  • Установить photo viewer windows 10