Amazon Simple Email Service
Developer Guide

Integrating Amazon SES with Exim

Exim is an MTA that was originally developed for Unix-like systems. It is a general purpose mail program that is very flexible and configurable.

To learn more about Exim, go to

To configure integration with the Amazon SES US West (Oregon) endpoint using STARTTLS

  1. Open the /etc/exim/exim.conf file for editing. If the file does not exist, create it.


    These instructions assume that you want to use Amazon SES in the US West (Oregon) AWS Region. If you want to use a different region, replace all instances of in these instructions with the SMTP endpoint of the desired region. For a list of SMTP endpoints, see Regions and Amazon SES.

  2. In /etc/exim/exim.conf, make the following changes:

    1. In the routers section, after the begin routers line, add the following:

      send_via_ses: driver = manualroute domains = ! +local_domains transport = ses_smtp route_list = *;
    2. In the transports section, after the begin transports line, add the following:

      ses_smtp: driver = smtp port = 25 hosts_require_auth = * hosts_require_tls = *
    3. In the authenticators section, after the begin authenticators line, add the following, replacing USERNAME and PASSWORD with your SMTP user name and password:


      Use your SMTP user name and password, not your AWS access key ID and secret access key. Your SMTP credentials and your AWS credentials are not the same. For information about how to obtain your SMTP credentials, see Obtaining Your Amazon SES SMTP Credentials.

      ses_login: driver = plaintext public_name = LOGIN client_send = : USERNAME : PASSWORD
  3. Save the /etc/exim/exim.conf file.

When you have finished updating the configuration, restart Exim. At the command line, type the following command and press ENTER.

sudo /etc/init.d/exim restart


This command may not be exactly the same on your particular server.

When you have completed this procedure, your outgoing email will be sent via Amazon SES. To test your configuration, send an email message through your Exim server, and then verify that arrives at its destination. If the message is not delivered, then check your system's mail log for errors. On many systems, this is the /var/log/exim/main.log file.