Containerised setup for running haraka
SMTP server.
This is an opinionated setup and installs some external plugins by default. You can use it as a base image and tweak the base plugins.
For a complete example, visit docker-compose.yml. You're expected to tweak this file and adjust it for your needs.
You can view the available tags here.
ghcr.io/mr-karan/haraka:2.8.28-json
ghcr.io/mr-karan/haraka:latest
haraka
has a weird structure of mixing the data and config files in a single directory (/etc/haraka/config
and /etc/haraka
respectively). Since /etc/haraka/config
and /etc/haraka
are overlapping directories, it's impossible to do a bind mount of /etc/haraka
on the host if you have a mount for the config directory.
It's possible to overcome this with docker volumes
and some amount of little shell-scripting in entrypoint. The drawback of using docker volumes is the inability to mount accounting_files
directory (accounting_files
plugin uses this to store SMTP logs) to the host and let an external log collection agent pick it up.
These are some of the opinionated decisions undertook to overcome the above directory issues:
/queue
is a symlink to the actual queue directory thatharaka
uses. The symlink makes it easier to mount to an external drive indocker
with bind mounts.smtp_logs
folder is created for storing SMTP Logs that theaccounting-files
plugin uses. You're expected to tweak the plugin's config file to store the logs in this directory./haraka/config
folder is a read only mount. Any kind of config changes must be done outside of the container.
You can use this as the base image and add support for more plugins in your own Dockerfile
.