Sign inSign up

lejmr/iredmail

By lejmr

•Updated 1 day ago

Automatic build of iRedMail

Image
65

50K+

lejmr/iredmail repository overview

⁠iRedMail in a container

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.

⁠Tags

  • lejmr/iredmail:latest - the latest release
  • lejmr/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" below

⁠Run

services:
  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.

⁠Manage

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.

⁠Upgrade from the old mysql-1.3 image

In 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.

⁠What is tested

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.

Tag summary

Content type

Image

Digest

sha256:78601090e…

Size

850.9 MB

Last updated

1 day ago

docker pull lejmr/iredmail