Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use an Amazon EC2 instance as an email server?

I want to be able to run an EC2 instance (CentOS LAMP based) as a mail server and create email addresses for users when they sign up so that they can upload files via email. The emails would be parsed and attached files processed and added to S3 for storage.

Is this feasible?

What mail package would I need for this? I would like to be able to create email address such as [email protected]

my domainname points to a webserver not on amazon web services so I realise this may not be possible.

where do I start with this, are there any good resources for setting up a mail server on EC2

many thanks

like image 480
undefined Avatar asked Dec 06 '22 04:12

undefined


2 Answers

To answer the question, yes it is possible. As paul says, if you require 24x7 and long term then EC2 may be more expensive than some other providers. But it can make sense if you're a startup or if you're doing this to learn more about these topics.

Basic steps would be:

  1. Create a linux EC2 Instance http://docs.amazonwebservices.com/AWSEC2/2008-02-01/GettingStartedGuide/?ref=get-started
  2. Install a mail package http://flurdy.com/docs/postfix/
  3. Change your DNS MX record http://en.wikipedia.org/wiki/MX_record

Amazon has had trouble in the past with blacklisting.. but they're trying to address that. Read here: http://developer.amazonwebservices.com/connect/thread.jspa?threadID=37650

Edit: You could also use a pre-configured CentOS image (combining step 1+2), this one has postfix already installed: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=821

like image 134
itchi Avatar answered Dec 11 '22 10:12

itchi


Using EC2 as a mail server does not seem like a good fit to me. You're not using either the "Elastic" or the "Cloud" part of the "Elastic Compute Cloud". You need something that has to be up 24x7, has the same IP all the time, and doesn't need to expand or contract on demand, so a VPS would be a better solution.

like image 43
Paul Tomblin Avatar answered Dec 11 '22 08:12

Paul Tomblin