{"id":18983909,"url":"https://github.com/velaluqa/docker-iredmail","last_synced_at":"2025-04-19T20:12:16.055Z","repository":{"id":71775571,"uuid":"45859572","full_name":"velaluqa/docker-iredmail","owner":"velaluqa","description":"iRedMail Docker image based on Phusion's baseimage-docker","archived":false,"fork":false,"pushed_at":"2017-11-13T20:46:16.000Z","size":26,"stargazers_count":22,"open_issues_count":2,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-30T06:31:33.354Z","etag":null,"topics":["docker","iredmail"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/velaluqa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-11-09T18:56:23.000Z","updated_at":"2021-01-20T20:36:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"542e27e7-6f3c-41c9-a7a2-a322dc611df5","html_url":"https://github.com/velaluqa/docker-iredmail","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velaluqa%2Fdocker-iredmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velaluqa%2Fdocker-iredmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velaluqa%2Fdocker-iredmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velaluqa%2Fdocker-iredmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/velaluqa","download_url":"https://codeload.github.com/velaluqa/docker-iredmail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223713858,"owners_count":17190569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","iredmail"],"created_at":"2024-11-08T16:19:06.448Z","updated_at":"2024-11-08T16:19:07.271Z","avatar_url":"https://github.com/velaluqa.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-iredmail\n\nThis is an all-in-one container for [iRedMail](http://www.iredmail.org) with OpenLDAP backend. It\nuses Phusion's\n[baseimage-docker](https://github.com/phusion/baseimage-docker) to\nmake sure all processes shut down correctly.\n\nBackups are disabled, because I snapshot my Docker volumes with ZFS\nregularily. To reenable them, just comment out one line from the\nDockerfile.\n\n**If you like or use this project, please star it ★ on Github and\n  Docker Hub.**\n\n## Usage\n\nReplace ```{variables}``` properly.\n\n1. Generate your iRedMail `config` file using the `configure` script.\n   Amend passwords as you wish afterwards. If you are updating your\n   container, read \"Upgrading your container to a new version of\n   iRedMail\" below first.\n2. Build your image with ```docker build -t iredmail:0.9.6-0\n   --build-arg DOMAIN={first domain} build/```. Note that this step\n   will take some time.\n3. Create an intermediate container with ```docker create\n   --name=iredmail iredmail:0.9.6-0```.\n4. Extract some folders from the intermediate container and fix the\n   owners:\n\n   ```\n   docker cp iredmail:/var/lib/ldap/{dn2dnsname} slapd-data\n   docker cp iredmail:/var/vmail/vmail1 mails\n   docker cp iredmail:/var/lib/dkim mail-domain-keys\n   docker cp iredmail:/var/lib/mysql mail-mysql-data\n   docker cp iredmail:/var/lib/clamav mail-clamav-data\n   chown -R 107:111 slapd-data\n   chown -R 2000:2000 mails\n   chown -R 110:115 mail-domain-keys\n   chown -R 105:109 mail-mysql-data\n   chown -R 109:114 mail-clamav-data\n   ```\n5. Remove the intermediate container with ```docker rm iredadmin```.\n6. Start your permanent container with volumes properly attached. You\n   will need a couple of docker arguments. Here's an example\n   docker-compose file:\n\n   ```\n   mail:\n     image: iredmail\n     hostname: mail\n     domainname: {first domain}\n     ports:\n       - \"25:25\"\n       - \"587:587\"\n       - \"993:993\"\n     volumes:\n       - /path/to/slapd-data:/var/lib/ldap/{dn2dnsname}\n       - /path/to/mails:/var/vmail/vmail1\n       - /path/to/mail-domain-keys:/var/lib/dkim\n       - /path/to/mail-mysql-data:/var/lib/mysql\n       - /path/to/mail-clamav-data:/var/lib/clamav\n       - /path/to/ssl.key:/etc/ssl/private/iRedMail.key:ro # user: root, group: root, rights: 644\n       - /path/to/ssl.crt:/etc/ssl/certs/iRedMail.crt:ro # user: root, group: root, rights: 644\n     cap_add:\n       - SYS_PTRACE # for UWSGI-iRedAdmin runsv script\n       - NET_ADMIN\n   ```\n7. Save your configuration file `build/config` in a save place. You\n   will urgently need it if you are upgrading your container to a new\n   version of iRedMail in future.\n\n## Upgrading your container to a new version of iRedMail\n\nThe configuration variables may change from release to release, so you\nhave to recreate this file using the `configure` script if you are\nupdating to a new version of iRedMail. You pick dummy values for all\npasswords.\n\nAfterwards, compare it to your former config file and copy all\npasswords from the old to the new config file. Your `LDAP_SUFFIX`\nshould not have changed, too - check the `dn2dnsname` you have\nprovided if this is the case.\n\nUsing this updated `config` file, build your updated iRedMail\ncontainer (see \"Usage\" above from step 2 on).\n\nIf you have lost the `config` file, you can restore all passwords\nmanually from `/opt/iRedMail.tips` within your current container.\n\n## Upgrade notices\n\nIf you're uncertain, do not skip releases and only update from one\nrelease to the release immediately following it.\n\n### 0.9.5(-1) -\u003e 0.9.6\n\nRestart your iRedMail container using the new `iredmail:0.9.6` image.\n\n#### iRedAPD\n\nExecute the following SQL in iredapd's MySQL database:\n\n```\nCREATE INDEX client_address_passed ON greylisting_tracking (client_address, passed);\n```\n\n### 0.9.4 -\u003e 0.9.5(-1)\n\nFirst, shutdown your running iRedMail container.\n\n#### MySQL\n\nMySQL has been updated from 5.5 to 5.7, so we need to run the\n`mysql_upgrade` command *twice*. Please set your path accordingly.\n\n```\ndocker run -it --rm -v /path/to/mail-mysql-data:/var/lib/mysql mysql:5.6 bash`\n```\n\nInside the container, run:\n\n```\nchown -R mysql:mysql /var/lib/mysql\nmysqld_safe \u0026\nmysql_upgrade -u root -p\nmysqladmin -u root -p shutdown\n```\n\nAfterwards, repeat the same steps with `mysql:5.7`.\n\n#### Slapd\n\nSlapd database backend has changed from `hdb` to `mdb`, so we need to\nexport and import again our data. Please set your `{dn2dnsname}` and\npaths accordingly.\n\n```\ndocker run -i --rm -v /path/to/slapd-data:/var/lib/ldap/{dn2dnsname} iredmail:0.9.4-2 slapcat -f /etc/ldap/slapd.conf \u003e ldap_export.ldif\ndocker run -i --rm -v /path/to/slapd-data-new:/var/lib/ldap/{dn2dnsname} iredmail:0.9.5-1 slapadd -f /etc/ldap/slapd.conf \u003c ldap_export.ldif\n```\n\nNow, restart your iRedMail container using the new `iredmail:0.9.5-1` image.\n\n#### Roundcube\n\nWithin the recreated container, changedir into\n`/opt/www/roundcubemail` and run `bin/update.sh`.\n\n## Contribution\n\nPull requests very welcome! :-)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelaluqa%2Fdocker-iredmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelaluqa%2Fdocker-iredmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelaluqa%2Fdocker-iredmail/lists"}