Getting Started with hMailServer: Installation and Configuration

choubertsprojects

VPN offers!

1. NordVPN

2. Surfshark

3. ExpressVPN

How to get started with hMailServer – the email server of choice for Linux, Windows and Mac. Whether you’re just getting started in a new role or transitioning from other servers, this article will walk through installing and configuring your first mail server.

The “hmailserver installation step by step” is a guide that will help you get started with hMailServer. It includes detailed instructions on how to install and configure the mail server.

Getting Started with hMailServer: Installation and Configuration

Microsoft Exchange is practically synonymous with the term “mail server.” You are not obligated to use Microsft Exchnage. Instead, you may use hmailserver, a free mail server.

And if you want to test it out, you’re in luck! Because you will learn about the fundamental prerequisites as well as how to install hMailServer and configure it as a mailbox and SMTP server in this tutorial.

You will have learnt how to do basic setup activities including adding domains, users, SSL certificates, and utilizing SMTP smart host for external email delivery at the Conclusion of this article.

Getting Your Environment Ready

This tutorial will show you how to set up and configure hMailServer on a single server. You will need to set certain criteria if you wish to follow along with the examples.

  • A machine running Windows Server 2016.
  • This link will download the most recent version of hMailServer.
  • An email client that allows you to access your email accounts. Mozilla Thunderbird will be used in this article.
  • Active Directory (optional). This is only required if you are going to generate hMailServer email users from Active Directory users. You can still create email users without it if you don’t have it.
  • (Optional) To encrypt email client connections, you’ll need a valid SSL certificate. Let’s Encrypt provides an SSL certificate for free. PEM format is required for the certificate. It’s OK if you don’t have this; hMailServer will still function without it.

Requirements for Databases

A built-in database (Microsoft SQL Server Compact Edition (CE)) may be installed with hMail Server. It’s appropriate for testing, limited deployments, and personal setups.

If you want to use hMailServer for commercial or production purposes, you’ll need an external database. If you want to utilize an external database, hMailServer supports the following database engines.

  • SQL Server 2000 or later is required.
  • MySQL
  • PostgreSQL

Only the built-in database will be utilized in this article.

Requirements for Networks and Ports

In your network, you must allow the following ports. You may choose to keep certain ports open that will not be utilized, depending on your intended use (e.g., IMAP only, no POP3).

  • 25. (SMTP)
  • (SMTP SSL/TLS) 465
  • 687 (SMTP Submission)
  • 111 (POP3)
  • 995 (SSL/TLS POP3)
  • 142 (IMAP)
  • 993 (SSL/TLS IMAP)

Requirements for DNS Records

For email delivery to work properly, mail systems depend significantly on DNS. So, both for internal and external resolution, suitable DNS entries must be in place.

To make things easy in this essay, we’ll use the following format:

  • For internal DNS, just one DNS (A) record will be utilized, which is the FQDN of the server where hMail Server will be installed. The server address in this article is hmail1.lzex.cf.

For the hMailServer, an example DNS (A) recordFor the hMailServer, an example DNS (A) record

(Optional) For the external DNS, two DNS records will be utilized.

MX records in DNSMX records in DNS

  • An MX record that will be utilized for mail delivery that points to the hMailServer’s external address.

Record for DNS (CNAME)Record for DNS (CNAME)

  • A CNAME record that points to the hMailServer’s external address and will be used for client connections (IMAP, POP3, and SMTP).

Visit the hMailServer’s System Requirement page for a comprehensive list of system requirements.

hMailServer installation

The installation of hMailServer is a rather simple procedure. It’s a wizard-based installation, which means you’ll be doing nothing but pressing buttons.

  1. Locate and run the installation file that you just downloaded. Then, on the welcome screen, click Next.
  2. You must accept the conditions on the License Agreement page. Select Next.
  3. Next, choose whether to install the hMailServer on a custom path or on the default path. Then press Next.
  4. There are no Full Installation or Custom options available to you. To install both the server and admin tools, choose Full Installation. Then press Next.
  5. After that, choose the database server type. The built-in database engine will be utilized in this article. Then press Next.
  6. To return to the default setting on the Select Start Menu Folder screen, click Next.
  7. The next step is to create a password for the hMailServer instance you’re installing. Make a mental note of this password.
  8. A summary of the installation choices you selected will be shown. To begin the installation procedure, click the Install button.
  9. After the installation is finished, click Finish.
  10. Select the instance of hMailServer in the Connect box and click Connect. When asked, enter your password and then click OK.

Instance of hMailServer in the Connect WindowInstance of hMailServer in the Connect Window

That’s everything! You’ve completed the installation of your first hMailServer.

hMailServer was successfully installed.hMailServer was successfully installed.

Hmailserver Domains Added

Just hMailServer installation is not enough to make it usable. You still need to configure things like domain(s), users, ports, and relay settings.

You must first add an email domain before you can add users. This has to be the email domain you’ve set up and want to use for your email address.

To add a new domain, go to Domains in the hMailServer Administrator (admin console window). You’ll note that the domain list is blank, which is to be anticipated. Then choose Add.

Domains to be added to the hMailServerDomains to be added to the hMailServer

Then, in the Domain box, input your domain. Make sure the Enabled option is selected before clicking Save.

There are further domain parameters available, such as message size limitations and default signatures. If you like, you may adjust those.

hMailServer Window Domain ConfigurationshMailServer Window Domain Configurations

A new domain has been established and added to the Domains list after selecting Save, as seen below.

Domains saved in the hMailServer windowDomains saved in the hMailServer window

Hmailserver User Management

Now that the domain has been added, email accounts may be created under it.

Click the Account folder beneath the domain to create a new account. Then, on the right, click the Add button.

User Addition to the hMailServer WindowUser Addition to the hMailServer Window

Select the Advanced tab and enter the new user’s first and last names.

Filling up the hMailServer Window with First and Last NamesFilling up the hMailServer Window with First and Last Names

Then, under the General page, enter the account’s address and password. Setting a maximum size for the user’s mailbox is also advised. Click Save when you’re finished.

Filling up the hMailSever Window with your address and passwordFilling up the hMailSever Window with your address and password

The new email account has been established, as seen in the figure below.

The hMailServer window now has a new email.The hMailServer window now has a new email.

Using Active Directory to Integrate Users

Existing users may be modified, and new users can be created and connected to Active Directory. By integrating a hMailServer user with Active Directory, your users will be able to log in to their hMailServer accounts using their domain credentials.

If you’ve previously established the account and wish to connect it to Active Directory, follow these steps.

To begin, go to the hMailServer admin panel and identify and update the account. Go to the Active Directory tab after that.

After that, mark the Active Directory account box. In the Domain box, type the active directory domain, and in the User name box, type the user name. Click Save when you’re finished modifying.

Adding a Domain to the Active DirectoryAdding a Domain to the Active Directory

The hMailServer user has an Active Directory account, as you can see in the picture above. The user may now access his hMailServer email account using his AD domain credentials.

Adding an Active Directory User

Instead of generating a user and then integrating it with Active Directory, an existing Active Directory user object may be used to create a user in hMailServer directly.

From the admin console, right-click on the Accounts folder —> click on Add AD Account.

Adding an Active Directory Account to the BoxAdding an Active Directory Account to the Box

After that, choose a domain from the dropdown menu. There is just one domain accessible in this scenario. Select the person for whom you wish to establish an email account from the list of users. Select OK.

User Registration in Active DirectoryUser Registration in Active Directory

A new user has been established in hMailServer based on the Active Directory user account vmadmin, as seen in the picture below.

Domain successfully added to Active DirectoryDomain successfully added to Active Directory

Setting up an email client and testing mailbox access (Unencrypted)

The hMailServer setup you’ve completed so far is sufficient for both internal and external email access.

Mozilla Thunderbird is the email client of choice in this scenario. Any other email client that supports IMAP, POP3, and SMTP setups is welcome to use.

This example’s mail client setup is shown below. Note the server’s hostname, port number, and SSL credentials.

Configuring the Email ClientConfiguring the Email Client

The SSL settings for the incoming and outgoing mail servers are None, as you can see in the image above. When you click Done, a warning notice appears, stating that the incoming and outgoing settings do not use encryption, as seen in the figure below.

Encryption Warning MessageEncryption Warning Message

Check the box that says I understand the risks to continue with the account setup. Select Done.

After you’ve completed the account creation, send a test email to the same account and ensure that it was sent and received. The test email was dispatched, as seen in the picture below.

Sending an email and confirming its receiptSending an email and confirming its receipt

SSL Certificates for Client Connection Security

As you can see from the preceding section, the present hMailServer configuration does not contain encryption for client connections through IMAP, POP3, or SMTP. Adding encryption to your mail client’s connection is a must for security and protection.

You’ll learn how to add an SSL certificate for authentication and encryption, as well as how to assign the certificate to POP3, IMAP, and SMTP, in this section.

You must have the Certificate in PEM Format and key before proceeding. The certificate files are stored at c:certs in this case.

Certificate in PEM FormatCertificate in PEM Format

How to Import an SSL Certificate

Back in the admin console, go to Settings —> Advanced —> SSL Certificates. It is expected that the list of certificates is empty. Click on Add.

How to Import an SSL CertificateHow to Import an SSL Certificate

After that, choose a name for your certificate. This may be any name, although the subject name of the certificate is suggested. Then, specify where the Certificate and Private key files are stored. Save the file.

Configuring the File Name, Location, and Private KeyConfiguring the File Name, Location, and Private Key

The new SSL certificate will be added to the list of possible certificates for usage by hMailServer.

SSL Certificate was successfully added to the hMailServer Admin Window.SSL Certificate was successfully added to the hMailServer Admin Window.

You may begin assigning the SSL certificate to the protocol ports now that it has been added.

TCP/IP Port SSL Certificate Assignment

Navigate to the TCP/IP Ports directory. A list of previously configured ports should appear. To establish a new TCP/IP port binding, click Add.

Folder for TCP/IP PortsFolder for TCP/IP Ports

Make a new IMAP entry using these values.

  • IMAP protocol
  • 0.0.0.0 TCP/IP address
  • 993 TCP/IP port
  • SSL/TLS connection security
  • Select your SSL certificate from the drop-down menu.

The new entry should resemble the one in the image below.

Making a New IMAP EntryMaking a New IMAP Entry

You may be requested to restart the hMailServer; do not do so yet since the POP3 and SMTP entries will still be created.

To establish the POP3 TCP/IP protected port, perform the method described above.

For the TCP/IP Port for POP3, use the values shown below.

  • POP3 protocol
  • 0.0.0.0 TCP/IP address
  • 995 TCP/IP port
  • SSL/TLS connection security
  • Select your SSL certificate from the drop-down menu.

New *POP3 TCP/IP ***** PortTCP/IP Port for POP3

Finally, use the following parameters to establish a new SMTP port.

  • SMTP protocol
  • 0.0.0.0 TCP/IP address
  • 465 TCP/IP port
  • SSL/TLS connection security
  • Select your SSL certificate from the drop-down menu.

New SMTP Port ConfigurationNew SMTP Port Configuration

When asked to restart the hMailServer, choose Yes this time.

hMailServer is being restarted.hMailServer is being restarted.

You’ve generated new TCP/IP ports that are protected by an SSL certificate. You should now see a list that looks like the one below.

TCP/IP Ports Have Been Successfully CreatedTCP/IP Ports Have Been Successfully Created

It’s up to you at this point whether you wish to erase the previous TCP/IP port information.

Setting up an email client and testing mailbox access (Encrypted)

Return to your email client and configure your email account to utilize the following settings, as indicated in the image below, now that an SSL certificate has been installed in hMailServer.

Take note of the changes to the SSL and Port Values in the new TCP/IP port configuration you made in the previous step. Incoming (IMAP) and outgoing (SMTP) email accounts will be set up here (SMTP authentication).

SSL and Port ValuesSSL and Port Values

You should be able to access the mailbox and send/receive emails using the new IMAP and SMTP ports after setting the email account.

In addition, the warning notice concerning the unencrypted incoming and outgoing mail server settings is no longer shown.

In Hmailserver, setting up an SMTP Smart Host for external mail delivery

hMailServer determines where emails to external domains must be sent using DNS-MX lookup by default. This implies that hMailServer may try to send external mails to the specified destination if port 25 is open in your network/firewall.

For certain businesses, this default configuration may suffice, however most organizations use a perimeter SMTP service. Perimeter email servers may be hosted in the cloud or locally. Most of the time, these perimeter mail services also offer email hygiene services.

You may setup hMailServer to use your perimeter mail server as a smart host for delivering external messages if you have such services and want to use them.

Follow these instructions to set up an SMTP relayer or smart host for your hMailServer.

In the hMailServer admin console, go to Settings —> Protocols —> SMTP. Next, go to the Delivery of e-mail tab.

Then, in the next box, provide the name of your hMailServer as it appears in your public DNS record. The email server’s public-facing hostname is hmail1.lzex.cf in this example.

Fill in the values for your SMTP smart host in the SMTP Relayer settings. As the smart host, hMailServer will be set to utilize SendGrid Email Delivery Service in this example.

Relayer Service for SMTP Relayer Service for SMTP

Remember to click Save after you’ve finished entering the appropriate information.

External Email Delivery Testing

The easiest method to ensure that the SMTP smart host setup works is to test it.

To check whether the SMTP smart host setup is functioning, do the following:

  • Sending an email to an external domain (such as gmail.com) and verifying that it was received.
  • Respond to the email and indicate that you got it.

A message will be sent from the hMailServer user [email protected] to a gmail.com recipient in this example.

hMailServer to Gmail Message SendinghMailServer to Gmail Message Sending

The message was received by the gmail.com recipient, as seen in the image below, and the reply was sent back to the hMailServer user inbox.

Gmail message sent successfullyGmail message sent successfully

Conclusion

Congratulations for making it to the finish!

The essential criteria for constructing a successful hMailServer email system were covered in this article. Then you learnt how to set up hMailServer on a single computer.

You’ve seen how to set up hMailServer with a new domain and add new users from scratch or from existing Active Directory accounts in step-by-step instructions. You’ve also learned the distinction between encrypted and unencrypted server connections, as well as how to protect TCP/IP ports for POP3, SMTP, and IMAP using an SSL certificate.

This article just covers the fundamentals of setting up a working hMailServer mail server. This article could not possibly cover all of the customization and setup options available with hMailServer.

Attaching a spam filter, creating a webmail server, and scripting are examples of advanced setups. If you want to learn more about hMailServer and develop your abilities, the decision is now yours.

Additional Reading

“How to use hmailserver to send email” is a tutorial that walks through the installation and configuration of the popular mail server. Reference: how to use hmailserver to send email.

Related Tags

  • setup hmailserver for local network
  • how to install hmailserver on windows server 2016
  • hmailserver setup windows 10
  • hmailserver setup windows server 2012
  • hmailserver active directory integration