How To Setup Smtp Server In Windows 2008
Send Email Direct on TFS
Estimated reading fourth dimension: 6 minutes
My SMTP post server requires that email be sent with TLS encryption and on port 587. This makes it problematic for Team Foundation Server (TFS) to ship emails directly. To piece of work around the problem, I installed the Windows 2008 SMTP Server service and configured information technology for relaying to my real SMTP mail server.
Contents
- Install SMTP Server
- Configuring the SMTP Service to Auto-Showtime
- Configuring the SMTP Service for Routing to Alternate SMTP Server
- Internet Data Services (IIS) Manager (IIS 7.0)
- Internet Information Services (IIS) 6.0 Manager
- Command Line
- Want More?
Install SMTP Server
To brainstorm, launch Server Manager and add the SMTP Server feature.
This includes a dialog to add together some boosted items.
Click Add Required Features and, later the dialog closes, click Adjacent > followed by Install.
The same tin be washed from the command line using:
ServerManagerCmd –Install SMTP-Server
Configuring the SMTP Service to Auto-Start
Unfortunately, the service is not configured to auto-starting time past default then you need to become into the services to change this:
To perform the same action from the control line use the following PowerShell commands:
Get-Service SMTPSvc | Set-Service –StartupType Automatic
From DOS yous could utilise sc.exe.
Configuring the SMTP Service for Routing to Alternate SMTP Server
Finally, yous need to configure the SMTP Server to redirect to an alternating SMTP server (bold information technology is not sending email directly). This involves settings in both IIS 7.0 and IIS 6. Open Cyberspace Information Server (IIS 7.0) and select the server node
Net Information Services (IIS) Manager (IIS seven.0)
- From within Net Data Services (IIS) Director, browse to the server'south SMTP E-mail service feature and open information technology.
- Within the SMTP Electronic mail windows, enter in the "send from" email address, the remote SMTP server DNS name (or IP accost) and the remote server port. In addition, select Specify credentials and enter the credentials required to connect to the remote SMTP server.
To perform the same action from the control line utilize the following commands (Powershell is optional):
appcmd.exe set config /commit:WEBROOT /section:smtp /from:Inigo.S.Montoya@IntelliTechture.com
/deliveryMethod:Network /network.port:587 /network.defaultCredentials:False
/network.host:smtp.intelliTechture.com /network.userName:Inigo.Southward.Montoya@intelliTechture.com
/network.password:***Where appcmd.exe is located in %windir%\System32\inetsrv\appcmd.exe.
Internet Information Services (IIS) half-dozen.0 Managing director
- Launch Internet Information Services (IIS) six.0 Managing director locate the [SMTP Virtual Server #] node and open up up the Properties dialog.
As shows, I only added 127.0.0.one then that I was only enabling the electric current box to send via this SMTP Server simply you can also add together a group of computers by subnet or an entire domain. - Next, navigate to the Delivery tab and modify the settings for all three buttons, Outbound Security…, Outbound connections…, and Advanced….
- For Outbound Security, switch to Basic Authentication and enter the remote SMTP Server credentials in improver to checking TLS encryption.
- On the Outbound Connections tab, switch the TCP port to 587 (or whatever port you need).
- Finally, on the Advanced Delivery tab, identify the Smart host equally the DNS (or IP address) of the remote SMTP server.
For the Fully-qualified domain name refers to the server you are configuring, the one the SMTP-Service is beingness configure on.
Unfortunately, I didn't come up with the command line for this item action. I did observe ii leads as to where there may be a command line solution, nevertheless:
- The first is the smtpsetup.exe programme (located in %windir%\system32\inetsrv). This program takes an INF file with the configuration data.
- Secondly, the configuration data itself is stored in %windir%\System32\Inetsvr\Metabase.xml.
Fifty-fifty though figuring out the terminal command line seemed within reach, I had no information as to how the password was encrypted and stored into the file and without much to proceed, I decided to motion on.
Command Line
Combining all the command lines together (except for the IIS 6.0 configuration) yields the following:
ServerManagerCmd –Install SMTP-Server $SMTPService = Get-WmiObject win32_service -filter "name='SMTPSvc'"$smtpservice.ChangeStartMode("Automatic")Set-Alias appcmd "$env:windirSystem32inetsrvappcmd.exe"appcmd.exe set config /commit:WEBROOT /department:smtp /from:Inigo.S.Montoya@IntelliTechture.com
/deliveryMethod:Network /network.port:587 /network.defaultCredentials:Fake
/network.host:smtp.intelliTechture.com /network.userName:Inigo.S.Montoya@intelliTechture.com
/network.password:***
Note: If you are forwarding to gmail'south SMTP server, hither are the settings you need:
SMTP Server: smtp.gmail.com
SMTP Port: 587
TLS encryption: Checked
Want More than?
Curious virtually what else y'all can do with Windows? Check out AAD: How to Clone/Re-create a Local Windows 10 Account to an Azure Agile Directory Account!
Source: https://intellitect.com/blog/configuring-windows-smtp-server-on-windows-2008-for-relay/
Posted by: makrisformaded.blogspot.com
0 Response to "How To Setup Smtp Server In Windows 2008"
Post a Comment