banner



How To Install Smtp Server In Windows Server 2008 R2

Y'all can install an SMTP server using built-in tools in all versions of Windows Server. This SMTP server can work as a postal service relay service that should receive and send SMTP emails from various devices in the organization (for example, senders, scanners, access command devices, etc.) and applications (web apps, SQL Reporting Services, SharePoint), which should exist able to send mail service using the SMTP protocol. Such a relay can send messages to your Commutation servers or to public email services such as Gmail, Yahoo, Function 365 (outlook.com), etc. (since information technology is not ever advisable to deploy a full-featured internal e-mail infrastructure based on Microsoft Exchange Server or other email services).

In this article we'll testify how to install, configure and test the SMTP server on Windows Server 2012 R2, 2016 and 2019 serving equally a mail relay. This SMTP server can just send or forward emails, and there are no user mailboxes on it.

Contents:

  • How to Install SMTP Service on Windows Server 2016 / 2012 R2?
  • Configuring SMTP Server on Windows Server
  • SMTPSVC Service Car-Beginning
  • Testing the SMTP Server on Windows

How to Install SMTP Service on Windows Server 2016 / 2012 R2?

SMTP service is one of the congenital-in features of Windows Server that tin be installed through Server Managing director. To do information technology, open the Server DirectorDashboard (servermanager.exe), go to Add roles and features and bank check SMTP Server when selecting the features to install. To manage the SMTP service, install the management consoles, being a part of Web Server (IIS) role, so you lot volition exist prompted to install some IIS components.

SMTP server feature on Windows Server 2012 R2

Leave all the suggested options of the Web Server (IIS) office and run installation.

IIS 6 Managment Tools

Y'all tin also install the SMTP server role using the PowerShell command:

Install-WindowsFeature smtp-server

After the components are installed, you may need to restart your server.

Configuring SMTP Server on Windows Server

The SMTP server is still managed using the old schoolhouse direction panel Internet Information Services (IIS) Manager half-dozen. You can open this console from the Server Manager: Tools-> Cyberspace Information Services (IIS) half-dozen.0 Manager or with the command inetmgr6.exe.

console Internet Information Services (IIS) Manager 6 console

Expand the co-operative with your server proper noun in the IIS vi Manager, right-click SMTP Virtual Server and open up its properties.

SMTP Server properties

On the General tab, if necessary, select the IP accost on which the SMTP server should respond (if the server has multiple IP addresses), and check the selection Enable logging (in order to save information about all received emails to text log files).

SMTP Virtual Server Settings

Then go to the Access tab.

smtp access tab

Hither click the Authentication button and brand sure that the Bearding access is enabled.

SMTP Authentication Settings: Anonymous access

Get back to the Access tab and click the Connection button. Here yous can specify the IP addresses of devices that are immune to send emails through your SMTP relay. To do information technology, check the Only the list beneath and specify the list of IP addresses (subnets), don't forget about yourself (127.0.0.i).

Configure the same way the list of allowed IPs in the Relay settings (click the corresponding button). This department indicates which IP addresses (or subnets) can relay email through your SMTP server.

smtp allow ip list

Note. As a general rule, it'southward worth to cheque this options and limit the listing of accepted devices with the range of IP addresses. Otherwise, your SMTP server may be used by spammers and other attackers as an open up relay for mass mailings.

Become to the Messages tab. Here the administrative e-mail service accost is specified, to which the copies of all NDR messages volition be send (Send copy of Not-Commitment Study to:). Likewise here you tin can specify the restrictions on the maximum message size (Limit message size KB) and the maximum number of recipients (Limit number of recipients per message).

messages limits

Become to the Delivery tab.

delivery options

Then click Outbound Security. Here you specify the style of authentication on the external mail server to which your SMTP server will send (relay) all email letters. For case, if all emails will be forward to Gmail post server and and so sent to the recipients, you need to bank check the Basic hallmark and specify your Gmail mailbox credentials (you must allow to send electronic mail via Gmail SMTP in the Google business relationship settings).

Outbound security: anonymous access

Then click Advanced.

Advanced delivery options

Here yous specify the FQDN name of your SMTP server. Click the Bank check DNS push button to make sure that the DNS tape is valid.

the domain name is valid

If your server sends mail to an external SMTP server, specify its name in the Smart host field (for example, smtp.gmail.com or smtp.office365.com).

Some public postal service servers have email just when using a secure SMTP connection using TLS Encryption (TCP port 587). Y'all can configure this setting in the section Delivery -> Outbound Security and Outbound Connections. Read the documentation of your email provider.

Relieve the SMTP server settings and restart your SMTP virtual service to apply the changes.

Note.

  1. The DNS settings are critical from the point of view of e-mail system health. If your SMTP server cannot correctly resolve DNS names of domains to which it is trying to transport email, the delivery volition fail.
  2. If your server sends mail service to other domains, it is important that the correct PTR record is created for your IP accost in society to resolve reverse DNS lookups. The PTR record for your public IP accost should bespeak to your server FQDN name. Otherwise, virtually external SMTP servers won't take email from you, because your server a spammer ane.

SMTPSVC Service Auto-Commencement

It remains to configure the automatic startup of SMTP service on your Windows Server. You can do it rapidly using the PowerShell command prompt:

set-service smtpsvc -StartupType Automatic

Commencement the service:

showtime-service smtpsvc

Brand sure that the SMTPSVC service is running:

become-service smtpsvc

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

Start smtpsvc service

Testing the SMTP Server on Windows

The last affair you lot have to do is to make sure that your SMTP server is working. It is easier to do information technology by creating a patently-text file smtp-test-e-mail.txt on your desktop and copying the following text to it. Don't forget to change the sender and recipient names to yours.

From: server@localdomain.com
To: admin@localdomain.com
Subject: Email test
This is the test email

smtp test email

Re-create the file smtp-test-email.txt to the C:\inetpub\mailroot\Pickup binder. The Windows SMTP server monitors new files appearing in this folder, and if a file is establish it volition read it contents and try to send an email with the given subject and trunk to the recipient specified in the To: line.

Check the recipient mailbox, and you lot will meet this e-mail.

test email in outlook

Tip. Y'all can examination your SMTP server using the telnet command, VBS script or PowerShell:

Transport-MailMessage -SMTPServer localhost -To managing director@localdomain.com -From server@localdomain.com -Subject "Electronic mail exam" -Body "This is the exam electronic mail from PowerShell"

If you accept enabled Basic Authentication to cosign all your SMTP clients (instead of anonymous hallmark), you can send an email with the smtp authentication via telnet every bit follows.

Likewise, brand sure that TCP 25 port is non blocked on your SMTP server by the local firewall or anti-virus software. The easiest way to do this is from a Windows-based figurer whose IP accost has been added to the allowed connection listing. Cheque availability of port 25 using the Test-NetConnection cmdlet:

Test-NetConnection smtprelay.woshub.com –port 25

If port 25 is blocked, check the settings of Windows Firewall, antivirus and hardware firewalls.

So, you have configured your own SMTP mail relay on Windows Server 2016 / 2012 R2 and tested sending emails through it.

Source: http://woshub.com/how-to-install-and-configure-smtp-server-on-windows-server-2012-r2/

Posted by: hillcloons.blogspot.com

0 Response to "How To Install Smtp Server In Windows Server 2008 R2"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel