Skip to main content

Using SparkPost with Exim

Last updated February 2020

Configuring Exim 4 to use SparkPost as the SMTP relay is very similar to the process described in this article.

Instead of your Gmail username, use 'SMTP_Injection' and for your password use an API key you have generated from your SparkPost account with the 'Send via SMTP' permission enabled. The mail server name should be and the port is 587, with STARTTLS enabled.

Note: we received additional tips from community member Andrew Christensen @andrewc. Exim uses the server’s hostname instead of the domain of the emailer, which can confuse things. To configure Exim with SparkPost do the following:

Exim Configuration Manager -> Basic Editor: Smarthost support = *

Exim Configuration Manager -> Advanced Editor: Find "Section: AUTH” and change it to: auth_login:    driver = plaintext    public_name = LOGIN    hide client_send = : SMTP_Injection : ——sparkpost api token ----

Find "Section: PREROUTERS” and change route_list = *

Edit the Exim conf using this direction.

Restart Exim and you're ready to send.

Was this page helpful?