Skip to content

Sending mail from aws instances

Steve Huff edited this page Sep 26, 2013 · 1 revision

We can use SES to send mail from AWS instances to external recipients. This requires some work in AWS and some work in Nepho.

AWS

  1. Browse to the "SMTP Settings" portion of the SES console and click "Create My SMTP Credentials".
  2. Save these credentials for later reference.
  3. Make note of the SES SMTP server name appropriate to your region.

Nepho

  1. Make sure your deployment is using a pattern with SES support included (at the time of writing, only single-host and full-monty). Check this by making sure the SESSMTP parameter is included:

     $ nepho -E <environment> show-params <deployment> | grep -A7 SESSMTP
     "SESSMTP": {
       "Default": "false",
       "Description": "Enable SES SMTP email?",
       "Type": "String",
       "AllowedValues": [
         "false",
         "true"
       ],
    
  2. If your deployment does not include SES support, add the following line to the Parameters stanza:

     {% include 'Parameters/SES-Parameters.json' %},
    
  3. Populate your YAML config with the following parameters:

     SESSMTP: "true"
     SESEndpoint: "<your SES SMTP server>"
     SESUsername: "<your SES SMTP user key>"
     SESPassword: "<your SES SMTP private key>"
     SESDomain: "devel.huit.harvard.edu"
    
  4. Configure your application to send mail via the local MTA (e.g. by using the sendmail binary, or by SMTP to localhost. If you're not using the sendmail binary, make sure you configure your sender address to be <somebody>@devel.huit.harvard.edu.

At this point you should be able to send mail to arbitrary external destinations. Don't make us regret this.