For a new mail server, use Stalwart. This image is maintained for the people who already run it: it is buildable and tested again on a current base and gets weekly security rebuilds. It will not get new features. Source, acceptance tests and changelog: https://github.com/lejmr/iredmail-docker
All-in-one iRedMail (Postfix, Dovecot, MariaDB, Amavis + SpamAssassin +
ClamAV, iRedAPD, iRedAdmin, SOGo with ActiveSync and CalDAV/CardDAV, nginx)
on debian:13-slim, supervised by supervisord, no --privileged.
lejmr/iredmail:latest - the latest releaselejmr/iredmail:YYYY-MM-DD - a release (same image also on
ghcr.io/lejmr/iredmail-docker)mysql-* - the old CentOS 7 image (2017-2021), unmaintained; see
"Upgrade" belowservices:
mail:
image: lejmr/iredmail:latest
hostname: mail.example.org
environment:
MAIL_DOMAIN: example.org
POSTMASTER_PASSWORD: change-me # or POSTMASTER_PASSWORD_FILE
TZ: Europe/Prague
CLAMAV: "1" # "0" to save ~1 GB RAM
ports: ["25:25", "465:465", "587:587", "993:993", "443:443", "80:80"]
volumes:
- mysql:/data/mysql
- vmail:/data/vmail
- certs:/data/certs # cert.pem (full chain) + key.pem for real certificates
- secrets:/data/secrets
- overrides:/data/overrides
cap_drop: [ALL]
cap_add: [NET_BIND_SERVICE, CHOWN, SETUID, SETGID, DAC_OVERRIDE, FOWNER, SYS_CHROOT, KILL]
volumes: { mysql: {}, vmail: {}, certs: {}, secrets: {}, overrides: {} }
Then docker compose exec mail admin domain add example.org (prints the MX
and DKIM records to publish) and admin user add [email protected] --password … --quota 2G. Web admin: https://mail.example.org/iredadmin/
as [email protected]. All five volumes are required - the container
refuses to start otherwise, instead of silently losing mail.
admin domain add|rm|list, admin user add|rm|list|quota|passwd,
admin dkim <domain>, admin backup > file.tar, admin restore < file.tar.
Config overrides that survive upgrades: overrides/postfix/main.cf.d/*.cf,
overrides/dovecot/*.conf.
mysql-1.3 imageIn the old container: mysqldump --all-databases --single-transaction > dump.sql and tar -C / -cf vmail.tar var/vmail. Start this image fresh,
then admin import-legacy dump.sql vmail.tar. Users keep their passwords,
mail and quotas; DKIM keys are regenerated - publish the printed records.
Every release proves 21 behaviours a mail admin expects - two servers
started from nothing exchanging DKIM-signed mail through a private DNS,
quotas, spam to Junk, viruses rejected, TLS, ActiveSync, CalDAV/CardDAV,
restart/upgrade, backup/restore, port exposure, legacy import - on every
pull request and weekly. The list is ACCEPTANCE.md in the repository.
Content type
Image
Digest
sha256:78601090e…
Size
850.9 MB
Last updated
1 day ago
docker pull lejmr/iredmail