Article Directory
hMailServer is a mail server, through which we can build our own mail service, and send mail remotely through the cpolar intranet mapping tool, no need to use a public network server, no domain name, and the name of the mail account can be customized.
The following uses the Windows 10 system as the environment to introduce the usage method:
1. Install hMailServer
Enter the official download: https://www.hmailserver.com/download, select the latest version, the browser may prompt a virus report when downloading, click to save
After downloading, open the exe file to install, just click Next to go to the next step, to set a password step, we set a password, and then Next to complete the installation
2. Set up hMailServer
Above we have completed the installation of hMailServer, now set the mail name and add an account, open hMailServer, click connect
to connect to the local service
Prompt to enter a password, the password is the password we set above, enter and click ok
After entering, we first need to add a mail subject name, clickAdd domain
We can set this name at will, and it only needs to conform to the standard format of a domain name, such as abc.com, 123.com, test.com, etc. We set it here for test.com
testing and use it. After setting, click sava to save
Add it to add an account, click Domains, then click Accounts under the main name of the domain name we set above, enter and click Add on the right to add an account
Enter the account name, and password. We can customize the name. The account we created here is our email account, and the account and password are the account password we log in to the email.
In the same way, let's create another one for easy testing, and the two names should not be repeated
After the setting is complete, we can see that there are two users in the list, and the server is set up
3. Client installation to add account
Above we have set up our own local mail service, now we install the client test, install a Foxmail client here for testing, enter the official website to download: https://www.foxmail.com/
After downloading and installing, open Foxmail after the installation is complete, we add an email account, click on other emails
Click on manual settings
On the page, we enter the account number and password created above, and fill in the address of the machine for the server address: 127.0.0.1
, other parameters are default, click Create after inputting
After adding the account successfully, we see our own account on the left, add the second account we created, and click Account Management under the left menu
We see a button to regularly receive mail, uncheck it, and then click New
Also select other emails—manual settings, enter the account password of the second email account we created above, and click Create
After creation, we also check the button to receive emails from time to time, click Apply, and the account is added
4. Test send email
We added two accounts in Foxmail above, now test sending emails, select an account, click write email
The recipient fills in another account of ours, then enters the content of the email, and clicks send
After the sending is completed, we click on the page to receive the email, and we can see the email we sent. If the click does not come out, you can wait for 10 seconds and click again. The local test sending email is completed. Next, we configure the remote sending email
5. Install cpolar
cpolar official website: https://www.cpolar.com/
For Windows system, you can directly download the zip compressed package suitable for Windows platform from the official website, get the cpolar installation package after decompression, and then double-click the installation package to install it by default.
6. Create a public address
After cpolar is successfully installed, visit the cpolar web UI management interface on the browser (the default is the local port 9200), and access it in the form of [http://local ip address:9200], such as http://127.0.0.1:9200/, And use the cpolar account to log in
After successful login, click Tunnel Management on the left - Create Tunnel, we first create the first tunnel, this tunnel is the mail receiving tunnel:
- Tunnel name: receive mail
- Protocol: select tcp protocol
- Local address: 110 (mail receiving port of the server)
- Port Type: Random ephemeral TCP port
- Region: China VIP
click创建
Create a second tunnel, send mail tunnel
- Tunnel name: send mail
- Protocol: select tcp protocol
- Local address: 25 (the email port of the server)
- Port Type: Random ephemeral TCP port
- Region: China VIP
After the creation is successful, click the status on the left dashboard - the list of online tunnels, and you can see the two tunnels that have just been created successfully, one for sending emails and the other for receiving emails, and the one in the middle is the corresponding public network address. Through this address we You can send emails from two accounts remotely.
7. Test sending mail remotely
Open our Forxmail email client, find the account we added, right click on Settings
Then set the addresses of the receiving server and the sending server. These two addresses are the two cpolar public network addresses we created above. The port corresponds to the port of the public network address. Remember not to make mistakes. After entering, click Apply.
After the setting is complete, we use the account with the public network address to remotely send emails to another account.
You can see that another receiving has been completed, and friends in the distance can send you an email by adding an account in this way
8. Fixed connection public network address
It should be noted that the above steps use the random temporary tcp port address of cpolar, and the generated public network address is a random temporary address, which will change randomly within 24 hours. Next, we configure a fixed TCP port address for it, which will not change, and there is no need to modify the address repeatedly every day after setting.
cpolar official website: https://dashboard.cpolar.com/login
Log in to the official website of cpolar, click Reserved on the left, find the reserved tcp address, and reserve the first address to receive emails:
- Region: Select China
- Description: Receiving email address
click保留
Reserve the address for the second send mail:
- Region: Select China
- Description: sending email address
click保留
After the address is successfully reserved, the system will generate a corresponding fixed public network address, copy the two addresses, remember to distinguish them here, and don’t confuse them
Enter the cpolar web ui management interface, click the tunnel management on the left dashboard - tunnel list, find the tcp tunnel we created above to receive emails, and click on the right编辑
Modify the tunnel information, and configure the fixed tcp address of the official website to reserve the successful receiving email address in the tunnel
- Port type: modified to fixed tcp port
- Reserved tcp address: fill in the receiving email address successfully reserved on the official website,
click更新
Then edit the second tunnel for sending emails
Similarly, configure another fixed address for sending mail to the corresponding sending mail tunnel
After the two tunnel settings are successfully updated, click the status on the left dashboard - online tunnel list, and you can see that the public network address has been updated to a fixed tcp address.
9. Test the fixed remote address to send mail
Similarly, we select one of the email accounts, right-click Settings
We replace the addresses of the receiving server and the sending server with the fixed addresses we set on the official website of cpolar. Remember not to reverse the addresses. The port corresponds to the port of the address. After setting, click Apply
Then select this email address to send email to another email account
We can see that the email is sent successfully, and another account also receives it successfully, so that our own email service is set up, and emails can be sent remotely at the same time.
Reprinted from the cpolar pole cloud article: Build a personal hMailServer mail service to send mail remotely