Generally speaking one of the components that is always overlooked in a home lab environment is a Mail Server. There are multiple reasons and probably the most recurrent one is the fact that installing a Mail Server can be a bit cumbersome for small environments. Or simply the fact that accessing the pertinent application consoles it might be quicker. But what if we want to easily manage multiple notifications in one place? Hence let’s take a look on how to install hMailServer.
That’s the purpose of this article and review how to install hMailServer on a Windows machine.
This article will split in two parts:
- Install hMailServer on a Windows Server
- Configure hMailServer to relay messages to Gmail SMTP server
So to the question why hMailServer?
Simply put and to quote the original website:
“hMailServer is a free, open source, e-mail server for Microsoft Windows. It’s used by Internet service providers, companies, governments, schools and enthusiasts in all parts of the world.
It supports the common e-mail protocols (IMAP, SMTP and POP3) and can easily be integrated with many existing web mail systems. It has flexible score-based spam protection and can attach to your virus scanner to scan all incoming and outgoing email.”
In particular I’ve chosen this Mail Server for it’s simple and straightforward configuration including the option to add SMTP relay to external servers. In my case Google SMTP.
So let’s start to install hMailServer on a Windows Server.
Quick install on Windows
First of all let’s download the latest stable version from the hMailServer website. At the time of writing this is version version 5.6.7 build 2425.
Let’s accept the agreement and continue.
We can now select a default location where to install the binaries. The same installer runs on both 32Bits and 64Bits in case of old workstation releases. For a full list of system requirements more details are available here.
Since this is the first install let’s proceed with all components as per screenshot below. Additionally it is possible to install just the Administrative tools to connect the even several hMailServer instances.
Let’s accept the default name and proceed.
We can now specify a password to manage the hMailServer installation. We need to provide this one each time we connect to this specific Mail Server from the Administrative tools.
The wizard has now all the information to proceed. Let’s click install to continue.
The installation really takes a few seconds so at this point we are now ready to initialize the hMailServer by providing the password created earlier.
The initial configuration wizard now begins. Next step is to create a database for hMailServer installation and configuration parameters including Mail Server details like Domain, Recipients, Protocols and a lot more.
Since this is a first time installation let’s create a new database. If we select the other option the wizard will automatically create a local SQL instance based on SQL compact edition.
In my case I will use an existing SQL instance available in my home lab.
So let’s provide the name of the SQL instance or eventually the one for a SQL cluster if available. In my case for some reason the Windows authentication didnt work so used the bult-in “sa” account instead.
A nice feature included in hMailServer is the option to set a dependency between the hMailServer service and a Database service. This will ensure the SQL Server service is running before hMailServer. As per screenshot below I have selected the main SQL Server service.
The wizard now has enough information to progress and the status if the action will appear in the window below.
After a few seconds the wizard is completed.
As per screenshot below the step to install hMailServer is now complete.
Next step is to to run the hMailServer Administrator console to configure the Mail Server settings. We’ll cover this in the next article including the setup for an external SMTP Mail server.