Windows Server 2012 Essentials does not come with Microsoft Exchange Server as its predecessor Small Business Server 2011 did. However, many small businesses still use a copier or multifunction device that has the ability to scan to email. Some units also allow a fax to email forwarding service. Unfortunately, many of these devices rely on some form of internal SMTP service to enable them to relay emails to recipients.
Fortunately, you can enable a SMTP service that is built into the core operating system for Windows Server 2012. Here how to do this.
Install the SMTP Service
Launch the Server Manager. From the Search charm, type in Server Manager to find it.
From the Dashboard, Add Roles and Features. The Add Roles and Features Wizard will begin. Click Next on the first screen.
Select Role-based or feature-based installation.
Select the Essentials Server (which should be highlighted by default).
Click Next to bypass the Roles selections.
Scroll down the list and tick the SMTP Server feature.
A new window will pop up to inform you that some other services will also be installed. Click Add Features to confirm and continue. Click Next to continue past the features selection screen.
Click Install to complete the Installation.
Click Close when the installation has completed.
Configure the SMTP Service
From the Search charm, type IIS. Hover your mouse over one of the selections, and run the Internet Information Services (IIS) 6.0 Manager.
Click Yes to the UAC Prompt.
Expand to SMTP Virtual Server #1, right click and select Properties.
General Tab: Set the IP Address to the server’s IP address.
Note: You can also enable logging is required.
Access Tab: Set the IP for the internal devices in the connection button.
Add the same IP to the Relay list.
Delivery Tab: Set an external domain – you can use the free customised domain from Microsoft, and you can also optionally add a Smart host, if required. Tick the Attempt direct delivery box, if you want the server to attempt to deliver the email directly first before trying the Smart host.
From the Search charm, type Firewall to locate and run the Windows Firewall with Advanced Security console.
Add a new Inbound Rule. (Right Click on Inbound Rule, and select New Rule)
Type in 25 as the local port.
Click Next (Allow the Connection).
Uncheck Public. (Prevents external access to the server)
Give the rule a name, and click Finish to create the rule.
You should now see a new rule enabled in the firewall management console.
Restart the SMTP Service and set the service for Automatic Start. Open up the Services Management Console. Double Click on the Simple Mail Transfer Protocol service. Stop and then Start the service. Set the Startup type to Automatic.
That’s it. The service is ready and waiting.
NOTE: You can also do this with Small Business Server 2011 Essentials, and also with Windows Server 2012 or Windows Server 2008 R2. With SBS2011 Essentials and Server 2008 R2, there is a slight difference in adding the SMTP Service role, but it is a fairly straightforward task.
102 thoughts on “How to set up an Internal SMTP Service for Windows Server 2012 Essentials”
Very helpful for me to configure smtp on window server.
Thanks for sharing the great knowledge. I have some queries :
1. How can i send a mail from SMTP in Virtual Image.
2. I have given the IP as 192.168.2.241 which u have mentioned .Is it correct ?
3. In smart host i have given mail.mydomain.com . Is it correct ?
You questions are somewhat vague.
1. Any program capable of using SMTP to send mail can be used to send the email.
2. The IP mentioned is a sample. You need to use the IP of the Internal Device that will be sending the email.
3. That is an example. Use your ISP’s SMTP server for the smart host entry.
But how to send mails..? And also help me to enable POP 3 service.
Your application will send the emails. In the application, you specify this server as the SMTP server.
The POP3 service is another topic. That is used for receiving emails.
Try here for a simple POP3 service. There is a free one that is great for testing and other simple situations and a paid one for more complex installations.
There are quite a number of free POP3 programs available. This blog is primarily designed to enable those who no longer have an on-premises Exchange server to be able to relay emails from their internal devices (photocopiers, server management utility, etc) to their cloud-hosted email service.
You should note that the SMTP service is very old and deprecated as of Windows Server 2012.
Yes, the SMTP service has been around for a very long time.
No, it is not deprecated and it still works fine in Windows Server 2012.
I am lost at #6. Please give me an example of what I need to place in the FQDN field. Do I type in the servername.mylocaldomainname.local? Or do I type in after the @ on my email firstname.lastname@example.org – so do I type test.com in that field?
The FQDN needs to be a valid domain name. So, in your example, test.com is what you will need to put in.
Where do I obtain the smart host domain name? I am currently using Office 365. Do I contact them?
Try this – http://support.microsoft.com/kb/2600912
which application should i used for sending and receiving mails…..
You can use any application. The point of the blog is to enable people to have a SMTP server on-premises, when you do not have a mail server to send mail. This is useful for devices like copiers, and network scanners, and for devices that send monitoring alerts and logs to be able to connect to a mail server inside your network.
thank u for replying…..
if we configure exchange server 2013 we can send and receive mails…. i have enabled smtp ….
i am beginner for this… i want learn more … plz help me… wat should i refer….
plz give me idea….
If you have Exchange Server 2013, you do not need to do any of this. I would suggest that you look for a Microsoft Partner in your area to work with you to configure your systems.
Hi, doing some research on how to setup the SMTP server came across with this board….I have being working on this for weeks now without any luck. It is mentioned above that “You can also do this with Small Business Server 2011 Essentials, and also with Windows Server 2012 or Windows Server 2008 R2. With SBS2011 Essentials and Server 2008 R2, there is a slight difference in adding the SMTP Service role, but it is a fairly straightforward task.”
well will like to know how to can i set the SMTP in a Windows Server 2008 R2 Standard.
I’m not an expert on it but very interested in finding out how i can accomplished this task…would like to see if anyone can help me with instructions on how to do this part will definitely appreciate it.
It works the same way.
In Windows Server 2008 R2, you need to install the SMTP Server Feature, which will add the Web Server (IIS) and Remote Server Administrator Tools roles. After that, open the Internet Information Services (IIS) 6.0 Manager and follow the instructions as per the blog.
Probably a dumb question, but why do you need an inbound rule? You’re sending email, not receiving it, right?
The point of the post is to be able to receive emails from an internal device, and then send it on to Office 365 or your other cloud email service. So, you need an inbound rule to receive the email from the internal device, and an external relay to send the email on.
I see, thanks for explaining. So what if I wanted a program running on the server to be able to send emails? Would an outbound rule for port 25 do the trick?
A program on the server can also be considered an “internal device”, so this article would also apply in the same way.
I’m not sure I understand the answer to the question. Then again, maybe my question is slightly different. If I want to use my email client on my home machine to send emails through my web server, do I have to create an outbound rule on the server?
The SMTP service is the outbound service. It is a component of IIS, of which the web server services reside.
You say the SMTP service is the outbound service, yet we created an inbound rule. This seems contradictory.
So I’m still confused. Do we need to create an outbound rule to use SMTP as the outgoing mail server? Or do we use the port specified in the inbound rule as the port for the outgoing mail server?
It depends on your firewalls. By default, outgoing traffic is not blocked in the Windows Firewall. If it is blocked, then you will need to create the specific rule.
Do you have any troubleshooting tips for when the program can’t send emails? I also tried Telnet but the emails are queued, not sent.
Check the logs – SMTP log and firewall log. If you haven’t enabled them, you will have to do that first. Then you will have a better idea of what is going on.
Thanks. Worked beautifully. This is for my UAT server where I dont need to send email but only to send to the UAT mailroot folder. I only made mistake in setting the server address in my program. Because the sample had server name as SMTP.Servername.com, I also thought should set like that. Realize that SMTP. is not a prefix but sample server name. Once I got this right it worked.
What is the function of the FQDN in step 6? SERVERNAME.subdomain.mydomain.local is filled in automatically and when I change it to subdomain.mydomain.com, the domain name is not valid. The firewall log doesn’t show any blocked traffic. The SMTP log shows timeout – 121. All in all not very helpful, I have no idea how to proceed.
Most anti-spam features now will check your FQDN against the public DNS servers to make sure that the domain is valid. If it is not, your email will be rejected.
If you want to use subdomain.mydomain.com, then you will need to make sure this entry is added to the domain zone file for mydomain.com.
So, if I understand correctly, an invalid FQDN won’t prevent the message from being sent but from being received. Still I don’t understand why subdomain.mydomain.com is not valid. It’s an existing subdomain and when I try to add it as a forward lookup zone, I am told it already exists.
Meanwhile my e-mails don’t get past the queued stage. It’s driving me insane.
You may have a different problem. This will be difficult to diagnose without more information.
Meanwhile, you can check your domain FQDN from some sites like hexillion.com and mxtoolbox.com.
OK, thanks for your advice.
Have followed instructions in blog (thanks) and am sending mails & receiving them to microsoft mail on the Win 2008 r2 server using the free visendo pop service. My question is, this only seems to work when the (virtual) server is connected and has access to the internet. Is there any way that the send / receive process can take place when the server is standalone and not networked in any way?
I’m not sure I understand your question. If you want to use the SMTP mail service as described, the SMTP service has to be able to connect to an external mail server to relay the emails. However, if you want to set up your own internal test environment, then you will need to ensure that your DNS server is also located internally, and will forward the SMTP services to the correct place without connecting to the Internet.
I am developing a mailing application and for now I am using gmail server to send and receive mails simply by writing server name as smtp.gmail.com . Howerver now i want setup my own virtual smtp sever and host the application in my college lab using LAN. Can anyone help me what changes i have to make in order complete my task ?
More information is required. It depends on what the application is, and how it is configured to send SMTP.
It is a mailing app in asp.net. You give your gmail id and password and using gmail port no 587 I m sending mails to any id. Here i am using gmail server authentication and gmail smtp server to send mails, But i want to set up my own virtual smtp server which will fetch messeges from the database server and send it to the other end. I will host the app in my college lab where computers are LAN connected and will create clients to exchange mail between them. They first have to register into the app, create their ids and send mail using smtp server on the server machine. I have the idea but failing to execute. Help needed badly.
An SMTP server does not “fetch” messages. A SMTP server can only receive messages from a sender, and then it “sends” the message on.
If you want a mail server that can “fecth” messages as well, you should then consider a third party mail server which has POP3 capabilities as well.
Yes i am using pop3 to fetch messages from gmail smtp server. All i want is to set up my own virtual smtp server which will send and receive messages and pop3 will fetch those messages and show it to the client. I want this set up to be a local one as ids created will be identified inside our network only that is college LAN. How to do it.
What is the term “FETCH” use for in here? I am looking a mail server to host my organization mail (Send , received, draft, etc) without using Exchange server. I have the Windows Server 2012 r2
If you are looking for a mail server to host your company email, then this is not the blog for you. You should look at some third party products that can do the job.
If you are running a small business with less than 25 users accounts, I would suggest that you can get better efficiency and cost savings in deploying a cloud based email solution like Office 365.
Bonjour , j’ai installer le service SMTP sous windows server 2012 mais lorsque j’ouvre IIS je ne peux pas démarrer SMTP un msg d’erreur s’affiche .
Check the blog again to see that you have set up the SMTP service correctly. Also check to make sure you do not already have another SMTP service running on the server.
What is the error message in the event log?
All seems fine yet when I go to Open up the Services Management Console there is no listing for Simple… nor SMTP nor even Microsoft Simple…
The service name in the Services Console is called Simple Mail Transfer Protocol (SMTP). It should be there if installed properly.
잘봤습니다. 정보 감사합니다.
하지만 저는 이해가 되지 않는 몇가지가 있습니다.
1.iis8에서는 설정할것이 없나요?
2.웹에서 코드로 발송을 해보셨나요?
메일로 답변 부탁합니다.
1. The SMTP service is installed on IIS6, not IIS8.
2. I don’t quite understand what you mean about communicating in code from the web.
Thanks a lot, This post saves a lot of time.
I know this is stupid question but I am new in internal mail and i never tried to setup one. This is my first time to setup internal email because we are in a province which we don’t have internet. Anyone can help me, Thank you very much!
After the installation and configuration. How will I setup that in outlook?
Like should I put in e-mail address: email@example.com
<–(rodel) because this is my username.
myserver.local is my domain name.
Account Type: IMAP
Incoming mail: imap.myserver.local
Is that correct configuration to be able to send and receive internal email?
This is probably not the right blog post for you to read.
If you want to set up an internal email system, have a look at some third party POP3 servers. These servers will set up a POP3 service(for receiving email), and SMTP services (for sending email).
I had followed all the steps mentioned above, all the mails are getting stuck in mailroot/queue folder . we are usinh windows 2012 operating system. i was stuck in theis task from past 15 days. can you please help me
What errors do you see in the logs?
This is usually caused by your server being unable to forward the messages to their destination.
Check the relay server and DNS.
I am getting the below error when i am trying to send the emails . The relay server settings were set as given in the Document. the Smart Host was given as ge.com.
Message delivery to the host ‘188.8.131.52’ failed while delivering to the remote domain ‘ge.com’ for the following reason: An SMTP protocol error occurred.
Please let me know where i am missing . i can provide the entire screenshots if required
It looks like your upstream relay server ge.com is not allowing you to send the emails. A company like this would have specific servers that you are allowed to connect to. You will need to check with their IT department for the correct information.
Thanks a lot. Im using Apache server 2.2, so I wanted to know how to configure SMTP for that. I tried that in many sites with no gain. If you have any idea about that please let me know. It will be really helpful for me. My email ID is firstname.lastname@example.org
This blog post is about Windows Server 2012, which includes IIS for free.
Apache is a web server and does not include email features (at least not that I know of). You should consider using a third party smtp program to work with your Apache server.
We installed the SMTP server on our windows 2012 server, we are then sending emails out of our Property Management System about 200 at a time and are getting bounce backs on about 1/3 of them, the default “From” user is an email address through a Microsoft Exchange Server, though the domain of the server is different than MS Exchange Server. Is there a limitation on how many emails can be sent through the MS Exchange server via a remote SMTP connection?
You will need to confirm the limits with your forwarding SMTP server. Often, there is a limit on the number of messages that can be sent in one go. You should also check out the SRV records on the domain to make sure they are correct.
Very useful, thanks.
i am currently working on a solution which of course requires smtp configurations for emails.i want to knw the difference between an internal SMTP and ISP smtp configurations.
An internal SMTP server exists inside your local area network. Your ISP SMTP server is hosted and maintained by your ISP.
I have setup the SMTP service on a server 2012 server. I want to use this as an internal relay for scan to email and to send reports from an application to internal users. I also want to have the application send out emails to external users. Is this where the smart host would come into play, to send out externally?
Yes, that is correct.
In your post on MAY 27, 2014 AT 8:52 AM, you suggested finding a 3rd party POP3 server which has a SMTP Service for sending email. What is the difference in that SMTP service and the SMTP server/service which comes with IIS? Can the IIS SMTP not just send email without Relaying it to another email service?
I’m trying to create a way for a simple application to send emails. This app does not have the ability to be configured with security, ports, and such. It’s only parameter is ’email server name’. Can I get IIS SMTP to do this, or do I need to find another application – and if so, can you, or someone recommend a good, reliable, free one?
The comment I was replying to was from Rodel R. Banez. He wanted to set up a mail server where he could receive AND send email. SMTP is a standard protocol, and there isn’t much difference in using either. If you deploy a third party email system, it will probably incorporate some sort of SMTP server as well.
Thanks BoonTee. This is a great blog, and very helpful!
So then to make sure I’m clear, I should be able to set up the SMTP on IIS to be able to just send email and not relay it through some other existing email server/account?
Yes, you can set up SMTP on IIS to send mail without a relay.
However, be careful that many spam filters may reject this if you do not have your MX records and domain records configured properly.
Hi, I’ve set up windows server 2012 running on Oracle VirtualBox on a Windows 8.1 OS to allow me to test SSIS 2012. I’m trying to use the SMTP service as shown on this page but am struggling to tell whether it is working or if outgoing emails are being blocked locally, by my host OS, or by my ISP.
I am seeing this Event: Message delivery to the host ‘109.aaa.bbb.ccc’ failed while delivering to the remote domain ‘ddd.co.uk’ for the following reason: The connection was dropped by the remote host.
When I try and use PowerShell to send a test email [Send-MailMessage -SMTPServer localhost -To email@example.com -From firstname.lastname@example.org -Subject “This is a test email” -Body “Hi, this is a test email via PS”] I get the following error:
Send-MailMessage : Unable to read data from the transport connection: net_io_connectionclosed
I’ve tried using a domain I own as the Advanced Delivery Fully-qualified domain name; and also my local ISP SMTP details. Neither seems to be working.
Can you advise the steps I need to take to trouble shoot this?
You need some tools to check where the issue lies.
Port scan tools may help. Also, try using some of the online tools.
It could also be due to spam filtering on the recipient mail servers.
I found this post really helpful, thanks a lot for the information.
After reading all the questions it is still not clear for me if I can configure the SMTP server tod work locally wihtout the relay servrer.
I am trying to do a school practice configuring e-mail service to be accesed from a client to a server configured with DNS, DHCP, etc.
The thing is that I want to configure Outlook be configured on a client PC to send e mails to another client under the same local network without internet connection
You will need a 3rd party mail server for this. There are some freeware ones, if you want just a simple connection.
we have a hosted exchange server with terrible support, where email sent to @ourdomain.com arrives.
we also have our own server with SMTP/IIS 6 admin installed, and we’ve been using it for years, with the FQDN set to @anotherdomain.com, but with email@example.com.
once in a while we get “suspected spam” rejection. I’m thinking it’s maybe because our from =/= @anotherdomain.com
I once tried setting the FQDN on our SMTP server to @ourdomain.com, but oddly enough, our copier scans were not going through … I immediately set it back.
best guess is, since the to address domain was the same as the FQDN on our SMTP, it thought it had already arrived at the proper server.
I tried using the masquerade domain, but in a quick test, it’s still using the FQDN in the Message-ID.
anyhow, is my guess close to accurate? or am I doing something else wrong?
You may also need to set up your SPF records.
i tried ur procedure,but i faced this problem..while accessing access tab my ip address access is denied… how to enabled this.. help me pls..
Read the section Configure the SMTP Service, point 5.
This post is really very helpful to know about SMTP service and setup this.Thanks
I have around 20 people sending too many email in every hour with different domain. All are different domains brought from different service providers.
What I want is to send all emails from one particular system. Something like they send all emails as usual and emails will be collected in one place PC/Server and it gets delivered outside our network (Internet or receiver through out the globe).
Also if above is possible I can easily rotate my internet connections so that emails will not be delivered outside using same internet connection all the time rather emails get delivered with different broadband connections.
Is there anyways I can achieve this?
Thanks in advance for helping me achieve this.
I would strongly suggest using a third party SMTP service with this kind of traffic.
Do you do private consulting?
Thank you for the share! Really helpful.
I set up the relay on my server and it works great for sending to clients external to my domain. However, I cannot send to anyone within my domain. Part of the problem might be that their internal domain matches their external website. Any suggestions? Possibly a dns error or something?
You probably need to set up the SPF records for your domain.
I don’t know how this may sound, But I want to be very clear on what I want to ask.
I have a windows server 2008 (AD) domain network and I would like to add a mail server role on the server machine that would allow me to configure outlook on the client machines, so that users can send and receive e mails within the local domain network.
Please is this possible?
No, this is not possible. You will need to get a mail server application or purchase Exchange.
Thank you so much for valuable information, with clear and detailed slides
Also, please how do I go about this?
Really this post was very conceptual configure step by step which is anyone can configure on us based server thank you for helping post.
I need to be able to relay messages from external sources. Do you have any resources I can use to add authentication to the SMTP server so my relay isn’t just open to the internet?
You should use a third party SMTP service. This is a simple SMTP service that is there to get you out of trouble if you need something basic off the server.
Good write-up. The pictures are nice and clear, and still relevant even 4 years later using regular Server 2012R2 (not SBS). Thanks man.
I already deployed SMTP server and what I have to do to connect with internal device (My Printer) and what I have to do to send scan documents to office email?
In the printer setting pages, look for SMTP Server. Put in the IP address of your server. Do the same to configure the scanner.
In some cases, if you are scanning to external sources, you may need to set up SPF records for your domain.
Is there a way scan-to-email can work on an MFP (Xerox WorkCentre 5845) with SMTP server settings?
I am running exchange server 2010 and i send my external email via send connector and that connector is configured with an ISP SMTP Server IP as a smart host in my send connector.
Now if i configure this internal smtp server and NAT its LAN IP with Public IP on firewall (ISP IP) and create a new send connector in exchange server and add this smtp server IP in smart host section of send connector. Then will my external emails will be sent by using this internal hosted smtp server
I don’t quite understand your question.
If you have Exchange Server 2010, you do not need this internal SMTP service.
Actually Sir, i have a different headache. i use ISP SMTP Server public IP for external emails transfer. Now for this i have to pay ISP on monthly basis. I have also the unused public IPs which are not of no use and are free.
So what i want to NAT these public IPs with my internal SMTP Configured in this way as you described in the blog, then use the IP of smtp server in send connector of my exchange server.
Is this possible?
This is quite an old post from 2012. Nowadays, you can use third party SMTP servers to do the same thing. Many of them are free. One that I use is smtp2go.
Unless you are sending mass marketing emails, these services will provide a better and safer way to send emails from internal devices.
Sir, can these third party services will fulfill my request i.e if i NAT the public IPs with the private IPs of these third party SMTP servers, then can i able to configure these smtp servers as a send connector in my exchange servers for external emails routing.
Need help in this.