Swaks (Swiss Army Knife for SMTP) as docker image for easy execution, for example in CI pipelines or for ad-hoc SMTP debugging.
By default this container uses user id 1000.
This image is provided for amd64 and arm64 architectures.
More information on Swaks: https://www.jetmore.org/john/code/swaks/
The container does not set an entrypoint, so invoke swaks (or any other shell command) explicitly.
Send a simple test mail:
docker run --rm trion/swaks swaks \
--to recipient@example.com \
--from sender@example.com \
--server smtp.example.com
Send via authenticated submission with STARTTLS:
docker run --rm trion/swaks swaks \
--to recipient@example.com \
--from sender@example.com \
--server smtp.example.com:587 \
--tls \
--auth LOGIN \
--auth-user myuser \
--auth-password mypassword
Show all options:
docker run --rm trion/swaks swaks --help
Drop into a shell to explore the image:
docker run --rm -it trion/swaks sh
Tag :1 available when :latest is not desired.
Run ./update.sh to check the latest swaks release on GitHub and bump the SWAKS_VERSION ARG in the Dockerfile. Set COMMIT=1 to also create a git commit.
The image is built by .github/workflows/build.yml using a build matrix on native GitHub runners — ubuntu-latest for amd64 and ubuntu-24.04-arm for arm64 — so no QEMU emulation is required. Each architecture is pushed by digest and then combined into a multi-arch manifest via docker buildx imagetools create.