Setting up Email Accounts EC2

Dfranc3373 picture Dfranc3373 · Nov 22, 2013 · Viewed 10.5k times · Source

I am just getting started with AWS and EC2 and can't quite get my head wrapped around what to do with email.

On previous servers, I would use it as a mail server and on cPanel create all the email accounts I needed, and could access them through web mail.

I can't get a consistent answer on how to set up email accounts on a domain that is pointing to an EC2 instance.

My question is, how can you set up email accounts for a domain pointed at EC2 instance, and if its not possible is there a way to set up emails on a third party like gmail with the domain pointed at EC2?

Just so you know the domain is managed at GoDaddy.

Thanks

Answer

datasage picture datasage · Nov 22, 2013

I suspect if you are trying to treat it like shared hosting, EC2 may end up being more work than its worth. If you do want to give it a shot, read on.

EC2 provides mostly barebones virtual machines that you can purpose for anything you may need. They don't come with hosting control panels as many people use instances for things other than hosting websites.

You should be able to install cpanel or directadmin, but you may have some difficulties getting it to licence correctly as licences are often tied to a public IP (In EC2 everything is NAT'd).

To set up email on your instance, you need to install some kind of email server. There are quite a few different options available depending on what host operating system you choose to use. There are alot of tutorials that can walk you through setting up a mail server.

Now, for the annoying part. All EC2 IPs are on Spamhaus blacklists. To get around this, you can you can either configure your email server to forward through Amazon SES or fill out this form to whitelist your server IP: https://portal.aws.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request

Running your own email servers on ec2 is doable, but if it is my call, i'll go with something like Google Apps for Domains to handle my email accounts.