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?
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.
In broad strokes:
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:
Tell Exim to send all outbound email to Amazon SES
If you truly are sending all outbound SMTP to SES, this is pretty easy. Find the
It's very simple. To accomplish the second and third goals, modify it to look like this:
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