Simple and Easy-to-use free email server hmailserver

Source: Internet
Author: User

Original blog address:

The company purchased the enterprise Post Office to provide email services to its employees, so there is no problem in sending and receiving external emails, but there is a very bad place, the vast majority of emails are forwarded internally, the result is a problem. No matter whether the email is sent internally or not, the email is circled on the external email server. If the email is small, it is okay to say that sometimes several MB of attachments, I had to take up a lot of network resources at the first delivery. I always wanted to find a way to make it possible for internal emails not to be transferred through the external email server. I just got it done in the LAN, what about sending and receiving external emails through an external server? Of course, most mail servers have such functions, but they are extremely large or valuable. Of course, there are many open-source software in Linux, however, the company still has a lot of software to run in windows, and the mail server configuration in Linux is complicated.

We accidentally discovered the hmailserver. hmailserver is a mail server running only in windows. First, the hmailserver is very small, and the latest version of 5.3.2 is only 3 M, however, hmailserver provides many functions, POP3, SMTP, IMAP service, multi-domain name, alias, SSL support, anti-virus, anti-spam, built-in backup function, script support, Server rule support, multi-language, MySQL, PostgreSQL, or MSSQL backend support, web management interface, etc, other mail servers have basically all functions of hmailserver. The most important thing is that hmailserver is an open-source software and is completely free to use. The hmaiserver configuration is also very simple. Let's get started.

Hmailserver requires the support of. netframework2.0. Therefore, install. netframework2.0 or disable it first. A prompt is prompted to install. netframework2.0 online during hmailserver installation. The software we need today is shown below.

Hmailserver 5.3.2, which can be downloaded from the official website of hmailserver.
Hmailserver 5.3 Chinese package, which can be found online, is actually very simple, that is, a. ini file
Wampserver 2.0 is a Windows Server Software for Apache + MySQL + PHP. It is simple and practical for free and can be downloaded from the wampserver official website.
If you only need to implement the hmailserver function, you do not need wampserver, but here I added webmail support, so PHP support is required.
Afterlogic webmail lite PHP is an easy-to-use webmail that supports Ajax and skin replacement. Supports POP3, IMAP, and SMTP. installation is very simple and requires support from PHP and MySQL. net version, here I will use the PHP version, can be downloaded on the afterlogic official website.

Start Installation
Wampserver installation is simple.

The installation of hmaiserver is also very simple. Install hmailserver to an independent partition.

If there are not many users, I will directly use the built-in database engine. If there are many users, you can select the following MySQL, MSSQL, and PostgreSQL databases.

No prompt for installing. netframework2.0 beforehand

Set the hmailserver management password

After the installation is complete, set Chinese in the Chinese file. INI is copied to the ages directory of the hmailserver installation directory. Because the Chinese file is 5.3, compare the English language file and copy the missing two lines.

Open the hmailserver. ini file in the bin directory and add Chinese support in the guilanguage field.

Stop the hmailserver service and start it again.

Open the hmailserver administrator and connect to the local server. The password is the management password set during hmailserver installation.

Go to the management interface, select Select language in the "file" menu, select "Chinese", and reconnect. The interface becomes Chinese.

OK, add a domain first. Here is This I applied for a Google Enterprise Post Office, so that I can share an internal account with external users.

Change the limit, including the space used by the domain, the maximum size of the email, the maximum user space, and the number of users. Here, the whole post office is assigned to 50 GB, with each user 1 GB, the maximum allowed email size is 50 MB, which is too heavy for the server.

Add an account after adding a domain, enter the user name and password, and save the account, huh? If an error occurs, it means that the domain has a limit on the space of each user. You must set the size of the user space here. You can save the space up to 1 GB.

In fact, it can be used here, but it was said that internal emails should be forwarded directly in the LAN. External emails should be sent and received by external email servers. Next, we should set the receipt of external emails, click the external account above and set it up. Only POP3 is available here. Gmail POP3 is special. You must first enable pop3 in Gmail, and SSL must be used. The port is 995, the interval is changed to a short point. Here I only want to test and change it to 0. This is not very good. 5 minutes is almost enough. After setting it, click Download.

Also set up to send, so unified with the account issued, if it is other accounts? Where will people reply? No problem. SMTP In Gmail uses SSL like POP3 and port 465.

Now we can test it through Foxmail.

Enter the full account name here.

I tested it locally. For both the receiving and sending servers, enter localhost. If other clients in the LAN test, enter the IP address of the hmailserver server.

Tested and passed

I have received some emails.

Now test sending out. Check the existing emails in the 126 mailbox.

Send one email to 126


You can see that the email is received immediately in the 126 mailbox.


View content

Set the web management and Webmail of the hmailserver. The web management is phpwebadmin of the hmailserver. webmail directly decompress afterlogic webmail lite.


First configure phpwebadmin, change the config-dist.php under the directory to config. php

Edit config. in PHP, set $ hmail_config ['rooturl'] and $ hmail_config ['defaultlanguage']. Set this parameter to an IP address to avoid access failure from other locations in the LAN, for external access, the domain name must be used and the language must be changed to Chinese. By default, the logon is Chinese.


Add two aliases and copy phpMyAdmin. conf In the alias directory to webmail. conf and phpwebadmin. conf respectively.

Edit the content of the two files.

Stop the wampserver service, exit and re-open it. You can see that two aliases are added.

Open http: // localhost/phpwebadmin. The logon page is displayed.

Unable to log on. The error code 403 indicates that access is forbidden. For Apache problems, modify webmail. conf and phpwebadmin. CONF file. Add to the end of the last allow from file. If you want to publish the file externally, set it here.

However, garbled characters are detected after logon. The default encoding is Western European characters. Enable index. php and change the character encoding to gb2312.

It's normal. The word is too small and ugly.

Find all style sheet files in the current directory

Replace all 10px with 11px

So much better.

Next, install webmail. Enter http: // localhost/webmail/adminpanel/install. php to start installation. Click Next and ask if you agree.

MySQL configuration, well, first use phpMyAdmin to add a database and an account. Here, the test is completed. OK. Skip the following steps and go to the next step.

Set Management Password

Test the connection with hmailserver. The connection is successful.

Delete the install.htm and install. php files. For security reasons, delete them.

Return to http: // localhost/webmail/adminpanel to log on to the webmail management interface.

If you haven't deleted the install.htm and install. php files, there will always be a prompt to let you delete them. Here we set up the receiving server. Here I changed the receiving server to IMAP, so you don't need to talk about the benefits.

Next we will change the default character encoding and default time zone.

Here we will set the default skin and default language. Well, although afterlogic webmail is known as a multi-country language, it can even be used in Japan, it is a pity that there is no Chinese

Here, I change the Logon Settings. I only use a single domain. I will display the domain name directly and enter the account only. The following two options must be checked, especially the second one.

The configuration is complete. Return to the logon page.

Log on to the console and check the Ajax logon result.

You can use webmail to send and receive emails.

Poor English interface? In the Lang directory. copy the PHP file and change it to Chinese. PHP. After translation, I only translated some words on the user interface. That's enough. You can select Chinese when you log on. It is best to set the default language to Chinese on the management interface, hmm? Is the interface garbled? Save as UTF-8. The default English is ANSI. Now the Chinese interface is displayed.

In this way, you can translate it for anyone who is idle. afterlogic webmail is relatively small and has a good interface. It is easy to configure and is worth using.

It takes a lot of time to write so much, and the features of hmailserver are far from being discovered. We hope that the cool brother will continue.
For the release of the hmailserver server, refer to another article on this site.ArticleUsing Dynamic IP + MDaemon to set up an email server

this article from the csdn blog, reprinted please indicate the source:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.