Amazon Simple Email Service
Developer Guide (API Version 2010-12-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Setting Up a Secure Tunnel

If you want to use TLS Wrapper to connect to the Amazon SES SMTP endpoint, but your MTA does not support TLS Wrapper, you can set up a "secure tunnel" to provide TLS Wrapper support. One way to do this is by using the open source stunnel program.

[Important]Important

Some MTAs have native support for TLS Wrapper, while others do not. Check the documentation for your mail server to determine whether it supports TLS Wrapper. If it supports TLS Wrapper, then you do not need to set up a secure tunnel.

To set up a secure tunnel using stunnel

  1. Download and install the stunnel software. For information, go to http://www.stunnel.org.

  2. Open the /etc/stunnel/stunnel.conf file. If the file does not exist, create it.

  3. Add the following lines to configure the secure tunnel. For the accept line, specify a port number that is outside the range of reserved ports and is not currently being used. For this example, we will use port 2525 for this purpose.

    [smtp-tls-wrapper]
    accept = 2525
    client = yes
    connect = email-smtp.us-east-1.amazonaws.com:465
                    
  4. Save stunnel.conf.

  5. At a command prompt, issue the following command to activate the tunnel:

    sudo stunnel /etc/stunnel/stunnel.conf

  6. Issue the following command to verify that the tunnel has been created. We are using port 2525 for this example; if you have specified a different port number, modify the command accordingly.

    telnet localhost 2525