David Williamson @ Varilink Computing Ltd
This repository contains a Docker Compose project that facilitates easy testing on the desktop of configuration setups for the Exim Internet Mailer as packaged for Debian.
Before using this repository, you must do three things:
- Create folder
etc/
(file paths are relative to the project root) containing your Exim configuration underetc/exim4/
and yourmailname
file inetc/mailname
- Create folder
src/
containing any testing Helper Scripts you want to use. - Create file
.env
containing values for theUID
andGID
of your desktop user account.
A utility is provided to initialise the contents of your etc/
folder with the relevant files from the exim
package in Debian:
docker-compose run --rm init
To ensure that the files created by this are owned by your desktop user on the host, your .env
file must contain the correct UID
and GID
; for example, here are the contents of my .env
file:
UID=1000
GID=1000
As you then make changes to the default Exim configuration provided via the Debian package, it's useful to be able to keep track of what you've changed. For this purpose, this repository provides a diff
service:
docker-compose run --rm diff
This produces a report of any configuration files that you have added to or deleted from those provided by the package install. It also reports any changes that you have made to configuration files provided by the package install.
When you've made your changes to customise Exim to your specific needs, you can test the results:
docker-compose run --rm test
This will take you into a bash shell in a container having first run update-exim4.conf
to apply your customised configuration within that container. There you can use the standard Exim provided testing tools; for example:
exim -bt recipient@example.com
To test a recipient address for deliverability.
Any custom scripts that you've put into your src/
folder for testing purpose will also be available to use; for example, if you had a script test.sh
in there, which looked something like this:
echo "Sending to recipient@example1.com from sender@example2.com"
/usr/sbin/exim -v $1 recipient@example1.com <<- EOM
To: recipient@example1.com
From: sender@example2.com
Subject: Test
Test sent via the Varilink Exim configuration testing tool.
EOM
Then you could run that script via:
. /usr/local/src/test.sh
I like to have one or more scripts like this, for different combinations of sender and recipient, which I can use to test send emails and if required pass an optional debugging flag; for example:
. /usr/local/src/test.sh -d-all+auth
This will give me debugging output for any custom authentication changes that I've made.