First: your SMTP server
postfix-rspamd-docker ships its own config, so it runs as a separate stack. Repo →
Prerequisites: a public IP whose reverse DNS (PTR) matches MAIL_HOSTNAME, your sending domain(s), and port 587 open.
MAIL_HOSTNAME=mail.example.com
MAIL_DOMAINS=example.com
SMTP_USERS=postmaster@example.com:change-me-strong-password
SUBMISSION_PORT=587 git clone https://github.com/nogringo/postfix-rspamd-docker.git
cd postfix-rspamd-docker
cp .env.example .env
# edit .env: set MAIL_HOSTNAME, MAIL_DOMAINS, SMTP_USERS
docker compose up -d
docker compose exec rspamd rspamadm dkim_keygen -d example.com -s dkim -b 2048
cd .. It publishes 587 on the host, so the bridge reaches it at mail.example.com on port 587 (its MAIL_HOSTNAME). Use the SMTP_USERS account as SMTP_USERNAME / SMTP_PASSWORD in the .env below, and publish the DNS records further down before sending.