Have you tried http://elasticemail.com/post/debianubuntu-tutorial-for-elastic-email? This might be an alternative to Amazon EC2 which I understand has very little support.
Debian/Ubuntu nullmailer with ElasticEmail
This tutorial is aimed to use nullmailer to relay all local email to the ElasticEmail cloud. This is useful if you don't want to rewrite your applications to use the API but want to use the awesome cloud delivery network of ElasticEmail.
Note: Nullmailer is a superb sendmail replacement with ElasticEmail. If an application wants to use SMTP directly however, it needs to be configured for ElasticEmail directly. Nullmailer only replaces sendmail and does not provide a local SMTP daemon.
To install nullmailer, use the following command. This will suggest to remove your previous installed mailer (exim4, postfix, etc.) but not purge it (so config files remain – if you want).
sudo apt-get install nullmailer
While installing, debconf should pop-up. If debconf does not pop-up, you can use the configfiles in /etc/nullmailer later. The corresponding config files are listed with each dialogue.
The first dialogue asks for your mail-name of the system (config file: /etc/mailname).
The default should work here, otherwise enter your hostname and choose "Ok".
The next dialogue asks for the smarthost to use for delivery (config file: /etc/nullmailer/remotes), which is ElasticEmail obviously, enter the following:
smtp.elasticemail.com smtp --port=2525 --user=YOURUSERNAME --pass=YOURAPIKEY
In the last dialogue you can configure the delivery of local messages (config file: /etc/nullmailer/adminaddr), like "somebody@localhost" which ElasticEmail would not be able to deliver. Enter a suitable email address for this case here.
If nullmailer was not automatically started, use the following command:
sudo /etc/init.d/nullmailer start
If you change the configfiles, use the following command to restart nullmailer:
sudo /etc/init.d/nullmailer restart
To test the delivery, use the commandline "mail"-tool (make sure the package "mailutils" is installed):
mail -s "test subject" [email protected]
and follow the instructions (enter message, finish with Ctrl+D). Check the ElasticEmail interface and your inbox if everything went ok.
© Copyright Thomas Lutz