Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server with cpanel installed. The smtp server on the machine is exim4.69. I would like to use amazon SES(simple email service) as the sending method, but keep exim functional for handling incoming mail. How do I tell exim to send via amazon SES?

share|improve this question

2 Answers 2

You are able to send emails via Amazon's SES API tools. It's not much like sending an email via SMTP. For authentication, you use your access id and your secret key. I'm not familiar with Exim, but I suspect that you will need a plugin for this.

To get started, see the scripts here: Amazon Simple Email Service Scripts

Make sure you read the included README as it contains very useful information.

share|improve this answer

In broad strokes:

  1. Tell Exim how to authenticate to Amazon SES
  2. Tell Exim to send all outbound email to Amazon SES
  3. Tell Exim to use authentication on all outbound connections

I'll give you an example, I'm going to assume that SERVER is the name of the server you would deliver email to on SES, PORT is the tcp port to connect to (i case the require 587 or something) and USER and PASS are the credentials. I'm also going to assume that SES uses PLAIN authentication. They may require something else, in which case you would need to modify the authenticator, but again this is an example

Tell Exim how to authenticate to Amazon SES

Create an authenticator that uses PLAIN as the type, and provide it with the client credentials you need for SES. Put something like this in the authenticators section of your config:

  driver = plaintext
  public_name = PLAIN
  client_send = ^USER^PASS

Tell Exim to send all outbound email to Amazon SES
Tell Exim to use authentication on all outbound connections

If you truly are sending all outbound SMTP to SES, this is pretty easy. Find the remote_smtp transport in your config. It probably looks like this:

  driver = smtp

It's very simple. To accomplish the second and third goals, modify it to look like this:

  driver = smtp
  hosts = SERVER::PORT
  hosts_override = true
  hosts_require_auth = *

And that's pretty much it - reload exim and you should be good to go. I assume Amazon offers TLS delivery. A stock Exim should negotiate outgoing TLS be default if it's available, but if you want to be safe you can add hosts_require_tls = * to the remote_smtp transport.

share|improve this answer
amazon doesn't allow use of smtp for talking to it's servers. –  Tutul Mar 13 '11 at 11:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.