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