Hmailserver email system configuration

Source: Internet
Author: User
Tags php and mysql roundcube webmail

In addition, if you have some problems when using hmail, you can find or discuss more hmail problems in my blog.

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.

It happened that hmailserver is a good email server. hmailserver is a mail server running only in windows. First, hmailserver is small, and the latest version of 5.3.2 is only 3 M, although hmail is small in size, it 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 hmail. 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 needs. net Framework 2.0, so install it first. netframework 2.0, or you can skip the installation, the online installation will be prompted during hmailserver installation.. NET Framework 2.0. The following describes the software we need today.

1. hmailserver 5.3.2, which can be downloaded from the official hmail website.
2. The hmailserver 5.3 Chinese package can be found online. It is actually very simple, that is, a. ini file.
3. wampserver 2.0, a simple and practical server software for Apache + MySQL + PHP in windows, which 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.
4. webmail and hmailserver do not provide webmail. 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. You can also select other webmail such as squirrelmail and roundcube webmail.

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 MSSQL ce. If there are many users, you can select the following MySQL, MSSQL, and PostgreSQL databases.

No prompt for installing. netframework 2.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 guilanguages 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 page, select Select language in file, select Chinese, and connect again.

OK, add a domain first. Here is viside.com. This viside.com 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 can be used here. Gmail POP3 is special. First, you must set to 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 admin@viside.com 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.

Here, the account name should also be filled in. If the default domain name in "Settings" and "advanced" has been set to viside.com, you can enter only the user name without the domain name, if you want to use multiple domains, except for the default domain name mailbox, the full name is required for the mailboxes in other domains.

I tested it locally. The receiving and sending servers both fill in localhost. If other clients test in the LAN, fill in 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 server. The web management is the phpwebadmin embedded in the software. 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 192.168.2.0/24 to the end of the last allow from 127.0.0.1 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 the email server. 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 language (the new version already comes with 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, the afterlogic webmail interface is beautiful, simple to configure, and still good. The new version already comes with Chinese, but it has fewer functions.

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: info-contact@alibabacloud.com 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.