I am not used to cloud hosting. Previously I would just setup an email account through cPanel, but since this is not available how would I go about doing this on a Amazon EC2 account? I am assuming I need a email server running? I installed 'postfix' on my linux instance. Now what?
Depending upon your requirements, you either
A) Use SNS
B) don't send email.
Sure, internal email will work fine, but just about everything you send should get rejected as spam unless you send from
SNS isn't intended for sending mail to end users, but if you're after monitoring or workflow configuration, it'll fit your bill quite nicely.
Likely you'll want an external mailhost. I hear Rackspace has some nice options, but I've never used them myself.
I was unaware of the Amazon mail requests form: this provides another option that will let you send mail from EC2.
You'll first have to allocate and assign an Elastic IP to your mail server, since this removes the fluidity problem. Be sure to set up monitoring, since if your mail server goes down your Elastic IP will be left dangling and you have to pay per hour for unattached Elastic IPs.
Next, you'll need to set up a forward mapping to this IP from your domain: in BIND syntax for the zonefile "example.com.", that'd be
Depending upon your DNS settings (specifically, your RTTL) this may take some time to propagate. It's easiest just to wait a day, but you'll probably be safe whenever a
You should also specify that mail to your server should be handled by
Include the EIP in the form where requested, and
(In BIND, the record would be entered as
As the form states, it may take some time for whitelists to be updated.
EC2 hosts are not intended to be terribly stable. If you use this as a production service you should have two mail server hosts configured fully redundantly. If/when one fails, you should have the ability to automatically or at least quickly deploy a new server to replace it.
These days, you may also be interested in:
Amazon Simple Email Service (Amazon SES)