How to Set up a Free Local Email Server
Today I want to share how to set up a local mail server for completely free in a few simple steps. This tutorial will use hMailServer and Opera Mail. Download those two programs and we'll get started.
Installing and Configuring hMailServer
The installation of hMailServer is fairly straightforward. Open the installation package and proceed to step through the setup pages. All of the default options are fine. When prompted, enter an administrator's password that you will remember. Finish the installation and the hMailServer administration login panel will open. Select the “Administrator” account and click “Connect”. You will be prompted to enter your password:
After you submit your password, hMailServer Administrator will open. Click the “Add Domain...” button.
Enter the domain name “localhost.localdomain” in the Domain text box and hit “Save”.
You will see the new domain added on the sidebar. Right click the “Accounts” sub-menu and click “Add...”.
Enter the name for your email account and then give a password for it as well.
After the new account is saved, go (in the sidebar) to Settings > Protocols > SMTP and click on the Delivery of email tab. Enter “localhost” into the Local host name field and save.
Next, go to Settings > Advanced > IP Ranges and select “Internet” and click “Remove”.
This will make your email server strictly local.
Configuring the Email Client
If you haven't already, download and install Opera. Other mail clients like Mozilla Thunderbird, Outlook Express, and possibly Microsoft Outlook should work, but I like Opera because it is has a good balance of features and simplicity, not to mention that it is embedded in a superb web browser! Open Opera and select “Mail and Chat Accounts...” from the Opera menu:
Choose “Email” from list of account options.
Enter your credentials into the appropriate text boxes. Make sure your email address matches the one you added in hMailServer.
Enter your full email address for the “login name” and type in your email account's password.
Next, change the incoming/outgoing server names to “localhost”. And hit “Finish”.
Close the “Manage Accounts” window and open the mail panel on Opera's sidebar. Click the icon to compose an email (or use the shortcut, “Ctrl + M”).
Now let's try it all out by sending a test email message to ourselves. In the “To” field, enter your local email address. When you are ready, hit “Send”.
Click the button to check for new mail at the top left corner of the Mail panel. If your setup works, you will see a new message arrive in your Inbox!
If your setup did not work, let me know so that I can assist you in solving the problem. Having a local email server is particularly useful when you want to test the PHP mail() function during development.
Posted October 3, 2011 at 9:25AM by Eli Mitchell in PHP, Opera, Email, hMailServer with 7 responses
0
It works in any domain?
0
I've never tried it on anything other than localhost because usually web hosts have a mail server already setup.
0
How simply you show the configure and install the hmailserver, it is very useful for all who don't know how to configure the mail server.
Thanks for sharing nice blog
0
I am trying to set up a local email host at my office because the one we currently have is hosted and will not run correctly with our network management software. Is it possible to set up hMailServer to run with its own domain name? Please email me so that I can give you full details. Thanks!
0
ive tried this multiple times but the test email just saves in out box any help???
0
Thanks a lot, it was very well and simply described! Good job. Thank you again for the clear step by step explanation.
0
It's been a while since I posted this article, so I decided to go over the steps again on my system, and it still works for me.
The only thing I can think to suggest at the moment is that you enable the POP3 logging in hmailserver: (Screenshot: http://prntscr.com/y4uyc) If the log is not showing any messages when you try to send/receive email, then the problem is probably in the Opera Mail account configuration. I hope this helps you isolate the problem!