views:

493

answers:

3

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

+1  A: 

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.

Paul Tomblin
+1  A: 

It can probably be done with the use of an elastic IP along with the correct configuration of the mail server on the ec2 instance to receive mails.

However, it might be easier to use Google AppEngine. You can forward the messages from [email protected] from your existing mail server to your appspot email address, then process the messages and store the files on S3 with a some appengine code in python. See the appengine documentation on receiving email for more information: http://code.google.com/appengine/docs/python/mail/overview.html

dar
+1  A: 

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%5Frecord

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

itchi