Public | Automated Build

Last pushed: 2 years ago
Short Description
Full Description

Docker Image for Exim4

This is a simple Docker image for Exim4 based on the official alpine image.

Use it like this in your docker-compose.yml file:

version: "2"
      image: primesign/exim4
        - "25:25"
        - "./conf/exim4.conf:/etc/exim/exim.conf:ro"
        - "./conf/ssl/exim.crt:/etc/ssl/exim.crt:ro"
        - "./conf/ssl/exim.pem:/etc/ssl/exim.pem:ro"
        - "/var/opt/smtp/spool:/var/spool/exim"
        - "/var/opt/smtp/log:/var/log/exim"

Smart Host Configuration

To send email via a smart host disable the dnslookup router in your exim4.conf. And add a smarthost router like follows:

 driver = manualroute
 domains = *
 transport = remote_smtp
 route_data =
 ignore_target_hosts = <; ; ; ::1

Replace with the hostname or IP adress of your smart host (e.g. in case of Office365 / Exchange Online).

For details see the official documentation.

SMTP TLS Client Authentication

In order to enable TLS authentication for the Exim SMTP client add tls_certificate, tls_privatekey and hosts_require_tls = * to your remote_smtp transport configuration in your configuration file, and mount or add the corresponding certificate and private key files into your container.

  driver = smtp
  tls_certificate = /etc/ssl/exim.crt
  tls_privatekey = /etc/ssl/exim.pem
  hosts_require_tls = *

For details see 9. Configuring an Exim client to use TLS in the official Exim4 documentation.

When exim is compiled with GnuTLS the TLS client authentication only works if the server specifies a list of accepted issuer certificates (see this bug entry) - Exchange/Office365 does not. Therefore, we switched to Alpine since it's exim version is compiled with OpenSSL.

Docker Pull Command
Source Repository