Setting up Email Accounts EC2

10,747

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.

Share:
10,747
Dfranc3373
Author by

Dfranc3373

Updated on August 18, 2022

Comments

  • Dfranc3373
    Dfranc3373 over 1 year

    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

  • Admin
    Admin over 10 years
    This is good advice, though if you only want to send email, you could configure your email server as a smarthost and use your gmail account to send mail. I do this for a server that just emails me cron output and fail2ban reports.
  • Dfranc3373
    Dfranc3373 over 10 years
    Thank you, this is great advice. Would I be able to use Google Apps to handle the emails if the nameservers are pointed to the EC2 instances IP? If so how would I do so?
  • datasage
    datasage over 10 years
    @Dfranc3373 Mail handling just cares about MX records. You can set up your MX records to send email anywhere you want.