Create your own Mail Server using hMailserver
Hello guys, today I will explain how to create Mail server locally using hMailserver.
What is Mail Server?
A Mail server (sometimes also referred as Mail Transfer Agent(MTA)) that handles and delivers e-mail over a network, usually over the Internet. A mail server can receive e-mails from client computers and deliver them to other mail servers.
There are plenty of MTA like Postfix, Exim, etc..
You can find Comparison chart in Comparison of mail servers — Wikipedia
To use other MTA you must own a Domain name and DNS record such that you can send mail with your custom domain name to other mail servers like Gmail, Hotmail, etc..
Similarly to you can use other SMTP relay to send mail with your mail server, but you need an account in that SMTP relay.
For example, you can use your Gmail account and stmp.gmail.com to send mail with your own Postfix server, below article will help you out for this scenario
Here we are going do in localhost.
Requirements:
- Obviously, hMailserver tool. You can download latest version from here hmailserver.com/download
- As hMailserver only supports Windows Operating system, Windows 7+ versions.
- Mail User Agent like Outlook, Thunderbird.
Installation:
After downloading latest version, open the .exe file. You will encounter window like shown below
Click next, and Accept the license agreement and you choose your own path or you can leave it has default
Then, you would be asked to choose database,
If you wish to use external database like MySQL, PostgreSQL please select external database it will ask for username and password for database.
But, Here I am choosing In-Built database, Click Next
Then, It will ask you to enter password for hMailserver administrator
Please remember it, you need it later to access administrator tool
Then procced with further installation.
After installation you will encounter below window. Click connect and it will ask for password you entered earlier in setup
After that, you will see hMailserver Administrator
Now we are going create custom domain(like @gmail,@hotmail) and we will add users to it.
Click Add domain and enter any domain name you wish.
I created two domains as something.com and something2.com. You can check domains you created in domains sections.
To add users in each domain select accounts in respective domain and click Add and you are asked to enter Email Address and Password.
Similarly I added an user in each domain as user1@something.com and user2@something2.com
Ah, We are done, Now lets test it.
Please keep running hmailserver Administration tool, if u close it you can’t add accounts or send mail between accounts.
Now open your favorite Mail Transfer Agent like Outlook, Thunderbird. Here I use Thunderbird.
Add an account using credentials you used create users in domain and click configure manually and enter details similar to picture given below.
As we are doing in localhost, we selected localhost in both IMAP and SMTP as server.
IMAP protocol used to receive mail and SMTP protocol used to send mail.
And Click done. It will give warning such that it receive and send mail without encryption, Ignore it and click done.
Similarly add another account so that we can send/receive between them.
Now we will send test mail from user1@something.com and user2@something2.com
Now let’s check inbox of user2@something2.com.
As you can see we actually received mail.
That’s it folks, we came to an end. I hope this article helps you.
Thanks for spending time on it