Install and Configure SmarterMail Mail Server
I remember the long gone days when email was a novelty. Today email has become a necessity with many of us being unable to fulfill our jobs without it. Now that you have your cloud server up and running you may only need to send email from your applications. If that is the case then you’ll want to check out this post.
However, chances are that you want to send and receive email. While you will find numerous mail server packages to choose from, I have had great success with SmarterMail from SmarterTools for many years so I will focus on setting that up. Chances are you will still find helpful information in this post regardless of the mail server package that you choose.
What’s great about starting with SmarterMail is that they offer a free edition. You can start out with one domain and up to 10 users at no charge and then upgrade your license as your needs grow.
Let’s get started!
Once the installation file is on your server, double click it to begin. Click Next.
Accept the agreement and click Next.
Change the installation location, if necessary, and click Next.
After it finishes, the default browser will open on the server. You can start with step 1 for a quick video tour if this is your first time using SmarterMail and want to learn more about it. Otherwise you can skip right to step 2 to begin the setup.
NOTE: You can also watch the quick video tour later from the admin interface.
If you have a license for SmarterMail, you can enter it here. Otherwise leave it blank and click Next.
Create your own unique Primary Administrator username or use the default admin user. Enter a complex password and click Next.
Adjust any paths as needed for your specific installation and then click Next.
Enter the Hostname. By default this will be your server name. Take note of the directions on the left and ensure that you have a reverse DNS entry (PTR record). Additionally choose the Primary IP of the server. You can optionally enter DNS servers here if you need ones different than what the server uses then click Next.
By default, the SmarterMail wizard will configure itself to use a Medium spam checking setting. Its spam checking and anti-virus checking can be resource intensive so I recommend that you initially set this to Low. You can tweak this later after monitoring how many resources it uses. Click Next to continue.
I recommend you make sure both check boxes are not checked initially as they are easy to enable later. Greylisting returns a temporary failure to all unknown incoming messages under the assumption that valid mail servers will retry to send the email. In theory this sounds good but in execution it sometimes may cause legitimate email to fail. ClamAV is effective at catching viruses but it also can use a lot of CPU. Click next when you have selected the choices that you want.
On the final screen, keep the default selection of ‘Relaxed abuse detection’ and then click Finish.
After you click Finish, the SmarterMail interface will load. There is an option to watch some Configuration Tutorials from SmarterMail. If you have time, I recommend it although since you have me helping set it up, you probably don’t need the tutorials.
Now that the wizard has completed you will want to change some of the settings although we will keep many of the default settings.
NOTE: You need to click Save on each tab or your changes will be lost when switching tabs.
From the left menu select Settings.
Under General Settings select the Server Info tab.
· Verify that the Hostname is correct.
· Enter a valid email address for Postmaster Mailbox in the format email@example.com. NOTE: All valid mail servers should have a valid postmaster email address.
· Click Save
Under General Settings select the Spool tab. While there are no settings here that have to be changed, I do recommend the following change.
· Set Retry Intervals to 5, 10, 15, 30, 60, 90. That will allow email to retry sending more times and at a few shorter intervals in case it fails to send initially. After the cumulative time of those settings, a Non Delivery Report (NDR) will be returned.
· Click Save
Under Protocol Settings select the SMTP In tab.
· Verify that Allow Relay is set to Nobody.
· Click Save
Under Protocol Settings select the SMTP Out tab.
· Verify that Use Primary IP on NIC is selected
· Verify that the Primary IP on the NIC is the same IP address that the Hostname resolves to and the same IP address that you created a reverse DNS entry for
· Click Save
Under Log Settings select the Log Detail Levels tab. Change any of the log levels to Detailed if you will need more information for that particular service/protocol/etc. Click Save if you made any changes.
Under Defaults -> Domain Defaults you should make some changes that will apply to all new domains created on the mail server.
Select the Technical tab.
· Check the box for Require SMTP Authentication
· Click Save
Review the other tabs and see if there any default settings that you want to change for new domains. Mail will work fine with the default settings but you should review these before setting up your first domain for consistency.
From the left menu select Security. Here is where you can change the Antispam settings, the Antivirus settings, Greylisting, and more. Look through these settings after you start receiving email to see if you need to make any adjustments.
The one change you will want to make is under Advanced Settings -> Password Requirements.
· Change the minimum length to 8
· Check the box for ‘require password does not match username.’
· I also recommend that you check the boxes to require at least a number and a capital letter. You don’t want any weak passwords that increase the odds of an email account being compromised.
From the left menu select Manage.
Under Services verify that all services are started.
That’s it for the initial configuration of the mail server. There are other settings you may want to look at and customize based on your needs. Otherwise the settings that I have provided will meet the needs of most users. Now we’re ready to setup a domain.
From the left menu select Domains. Here you will create a new domain. You can also do it through the icon above domains.
Once you have added the domain, click on Manage at the top of the right window. That will open up a new tab or window so that you can manage the domain.
Under Domain Settings -> Users you will see that one user has been added by default, admin@. Per the Internet Engineering Task Force (IETF) RFC821 and RFC822, it is required that all email domains have a postmaster@ mailbox for SMTP service and RFC2142 requires an abuse@ mailbox for people to report inappropriate public behavior. While this isn’t strictly enforced, it’s always best to stay compliant so create the two aliases above for the newly created domain that point to a mailbox someone will be monitoring. I usually point them to the admin@ mailbox.
Next you want to make sure you can connect to the mail server remotely through the required ports. The easiest way to do this is by using telnet at a command prompt.
NOTE: You need to have the Telnet Client installed on your computer. It is a Windows feature that you can install through the control panel.
You will type the following, replacing [IP] with your server IP address and replacing [PORT] with the port that you are testing.
telnet [IP] [PORT]
You will want to test ports 25 (SMTP), 110 (POP3), 587 (alternate SMTP), 143 (IMAP). If you can’t connect through any of the ports, open them in the Windows firewall and/or any perimeter firewall on your network. Don’t move forward until you have confirmed that you can connect through the ports, especially 25, or your email won’t work.
Check For Open Relay
If you have followed my walk through up to this point, you should be good. However it is always best to verify that your mail server is not an open relay. If it is, it won’t take very long until spammers find it and you will find yourself blacklisted.
From the command prompt type the following replacing [IP] with your IP address:
telnet [IP] 25
You should receive a 220 response from the newly installed mail server. Then type:
You should receive a 250 response and a Hello from the mail server. Next type the following replacing [EMAIL] with any valid email address not on this mail server:
You should receive a 250 OK response with Sender ok message. Next type the following replacing [EMAIL] with any valid email address not on this mail server.
You should receive a 550 response with No such user here message. That means that the mail server is not an open relay.
Send Test Email
Back in SmarterMail at the tab where you were managing the new email domain, you should see in the upper right that you are logged in as the admin user.
Click on Email in the left menu then select your Inbox. Test sending an email from the web interface. If your mail is received by the recipient then you should be all set. You can finish testing your email once you have the DNS records pointing to your new mail server.
NOTE: By default SmarterMail uses its own built in web server that is only accessible directly on the server. If you would like to be able to use the web interface externally you will need to setup SmarterMail in IIS. SmarterTools has a great KB article on how to do that.
Disable Microsoft SMTP
The final step is to disable Microsoft SMTP under services if it is installed. Most likely the service is set to manual so you will want to set it to disabled. Otherwise it could cause issues if both services are trying to use port 25 at the same time.
By following this simple guide you should have your own mail server up and running.