Configuring a free windows mail server on AWS

Posted on Updated on

I have an Amazon Web Services windows server (which costs me a small fortune every month!). I really like the scalability of AWS and what you can do with it.Image
Until recently I was using a Linux VPS with mail I decided it was an additional expense I didn’t need now that I have the windows server… but shelling out for a copy of Microsoft Exchange wasn’t on the cards so I had a look around and decided to try hMailServer as I only have a handful of domains and only wanted a couple of few POP3 addresses.

hMailServer is a free e-mail server for Microsoft Windows. It’s used by Internet service providers, companies, governments, schools and enthusiasts in all parts of the world.
http://www.hmailserver.com/

So where to start?

  1. First things first set up Route 53 with an MX record directly to the public DNS, server IP  [or elastic IP] of the EC2 instance- I found out the hard way that AWS doesn’t support port 25 through the load balancer.
  2. Secondly set up Route 53 with an A record, again direct through to the public DNS, server IP [or elastic IP] of the EC2 instance
  3. Now go to the security group of the EC2 instance and add the POP3 (Port 110) and SMTP (Port 25) ports to your security group
  4. Now within your EC2 instance open windows firewall and add and enable the same ports
  5. Now follow the tutorial here http://www.hmailserver.com/documentation/v5.3/?page=basic_configuration
  6. Thats it everything should be up and running!

Couple of points to note

  • Your DNS might take a while to update, so be patient with your MX and DNS additions and check them with a web based tool like http://www.mxtoolbox.com/ before you give up
  • To check the ports are open and communicating, run the following command from the EC2 instance and your desktop computer
    • telnet [mail IP or DNS] 110
    • telnet [mail IP or DNS] 25
  • Some ISPs block port 25 so you might not be able to send email, your ISP may have a specific SMTP address you need to use
Advertisements

One thought on “Configuring a free windows mail server on AWS

    Johann Josefy said:
    January 27, 2015 at 2:06 am

    Thanks man! Saved me a lot of time!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s