Amazon is package of utilities to work with Amazon Web Services (AWS). It is composed of serveral separate tools:
- AWS branded scripts - bundled only for easier access as their documentation is somehow confusing
- SES SMTP relay - implementation of SMTP server that forwards incoming mail messages to Amazon SES (simple e-mail service) via Boto library
- SMTP relay daemon - Python executable which will daemonize when executed. Works as support for SMTP relay to use it as service on servers.
Scripts are written in Perl and require following .deb packages to be installed:
- libxml-libxml-perl
- libssl-dev
Most of the scripts also require you to have valid Amazon AWS credentials. It’s easier to put them in the file in your home directory. Example content of the file goes like this:
AWSAccessKeyId=YOUR_KEY_ID
AWSSecretKey=YOUR_SECRET_KEY
These consist of following:
ses-verify-email-address.pl
Use to verify e-mail addresses with Amazon SES. Example usage:
./ses-verify-email-address.pl -k ~/.amazon_aws.cred -v example@email.com
This is very simple Python implementation of SMTP server. The only thing it does is to forward the messages to Boto library, which is a Python interface for Amazon Web Services.
Parameters: |
|
---|
Daemon can be used to run SMTP relay server as a service in unix-like environments. It expects Debian distribution though.
Steps to run the service are following:
- Install fragapy library from sources repository. Install boto library.
- Make symlink of smtpreldaemon.py to /usr/sbin/smtpreldaemon
- Copy smtp_relay.sh to /etc/init.d
- Create user amazon.
- Create /home/amazon/.smtpreldaemon.cfg and edit configuration. You can take smtpreldaemon.cfg as template.
- Set permissions to chosen config files to amazon user.
- Install daemon: update-rc.d smtp_relay.sh defaults
Last step ensures that the smtp_relay.sh will be run on startup of the server automatically so you don’t need to care about it.