mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
docs: Update all docker-compose files to use the same version and examples (#2159)
Initial pass for achieving more consistency with docker-compose related configs. * Set DMS_DEBUG to 0 * align with default docker-compose.yml Co-authored-by: Casper <casperklein@users.noreply.github.com> Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
ddd97274e0
commit
4d3fade23b
|
@ -3,8 +3,8 @@ version: '3.8'
|
||||||
services:
|
services:
|
||||||
mailserver:
|
mailserver:
|
||||||
image: docker.io/mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
hostname: <HOSTNAME> # <-- CHANGE THIS
|
hostname: mail
|
||||||
domainname: <DOMAINNAME> # <-- CHANGE THIS
|
domainname: example.com
|
||||||
container_name: mailserver
|
container_name: mailserver
|
||||||
env_file: mailserver.env
|
env_file: mailserver.env
|
||||||
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
|
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
|
||||||
|
@ -24,4 +24,7 @@ services:
|
||||||
- ./config/:/tmp/docker-mailserver/
|
- ./config/:/tmp/docker-mailserver/
|
||||||
restart: always
|
restart: always
|
||||||
stop_grace_period: 1m
|
stop_grace_period: 1m
|
||||||
cap_add: [ "NET_ADMIN", "SYS_PTRACE" ]
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- SYS_PTRACE
|
||||||
|
|
||||||
|
|
|
@ -126,13 +126,13 @@ To enable LDAP over StartTLS (on port 389), you need to set the following enviro
|
||||||
???+ example "Basic Setup"
|
???+ example "Basic Setup"
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '2'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
mail:
|
mailserver:
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
hostname: mail
|
hostname: mail
|
||||||
domainname: example.org
|
domainname: example.com
|
||||||
container_name: mail
|
container_name: mailserver
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "25:25"
|
- "25:25"
|
||||||
|
@ -172,7 +172,7 @@ To enable LDAP over StartTLS (on port 389), you need to set the following enviro
|
||||||
- DOVECOT_PASS_ATTRS=uid=user,userPassword=password
|
- DOVECOT_PASS_ATTRS=uid=user,userPassword=password
|
||||||
- DOVECOT_USER_ATTRS==home=/var/mail/%{ldap:uid},=mail=maildir:~/Maildir,uidNumber=uid,gidNumber=gid
|
- DOVECOT_USER_ATTRS==home=/var/mail/%{ldap:uid},=mail=maildir:~/Maildir,uidNumber=uid,gidNumber=gid
|
||||||
# <<< Dovecot LDAP Integration
|
# <<< Dovecot LDAP Integration
|
||||||
|
|
||||||
# >>> SASL LDAP Authentication
|
# >>> SASL LDAP Authentication
|
||||||
- ENABLE_SASLAUTHD=1
|
- ENABLE_SASLAUTHD=1
|
||||||
- SASLAUTHD_MECHANISMS=ldap
|
- SASLAUTHD_MECHANISMS=ldap
|
||||||
|
@ -191,14 +191,14 @@ To enable LDAP over StartTLS (on port 389), you need to set the following enviro
|
||||||
??? example "Kopano / Zarafa"
|
??? example "Kopano / Zarafa"
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '2'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mail:
|
mailserver:
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
hostname: mail
|
hostname: mail
|
||||||
domainname: domain.com
|
domainname: example.com
|
||||||
container_name: mail
|
container_name: mailserver
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "25:25"
|
- "25:25"
|
||||||
|
|
|
@ -28,22 +28,22 @@ While indexing is memory intensive, you can configure the plugin to limit the am
|
||||||
plugin {
|
plugin {
|
||||||
fts = xapian
|
fts = xapian
|
||||||
fts_xapian = partial=3 full=20 verbose=0
|
fts_xapian = partial=3 full=20 verbose=0
|
||||||
|
|
||||||
fts_autoindex = yes
|
fts_autoindex = yes
|
||||||
fts_enforced = yes
|
fts_enforced = yes
|
||||||
|
|
||||||
# disable indexing of folders
|
# disable indexing of folders
|
||||||
# fts_autoindex_exclude = \Trash
|
# fts_autoindex_exclude = \Trash
|
||||||
|
|
||||||
# Index attachements
|
# Index attachements
|
||||||
# fts_decoder = decode2text
|
# fts_decoder = decode2text
|
||||||
}
|
}
|
||||||
|
|
||||||
service indexer-worker {
|
service indexer-worker {
|
||||||
# limit size of indexer-worker RAM usage, ex: 512MB, 1GB, 2GB
|
# limit size of indexer-worker RAM usage, ex: 512MB, 1GB, 2GB
|
||||||
vsz_limit = 1GB
|
vsz_limit = 1GB
|
||||||
}
|
}
|
||||||
|
|
||||||
# service decode2text {
|
# service decode2text {
|
||||||
# executable = script /usr/libexec/dovecot/decode2text.sh
|
# executable = script /usr/libexec/dovecot/decode2text.sh
|
||||||
# user = dovecot
|
# user = dovecot
|
||||||
|
@ -62,7 +62,7 @@ While indexing is memory intensive, you can configure the plugin to limit the am
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
mailserver:
|
mailserver:
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
hostname: mail
|
hostname: mail
|
||||||
domainname: example.com
|
domainname: example.com
|
||||||
container_name: mailserver
|
container_name: mailserver
|
||||||
|
@ -82,7 +82,9 @@ While indexing is memory intensive, you can configure the plugin to limit the am
|
||||||
- ./fts-xapian-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro
|
- ./fts-xapian-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro
|
||||||
restart: always
|
restart: always
|
||||||
stop_grace_period: 1m
|
stop_grace_period: 1m
|
||||||
cap_add: [ "NET_ADMIN", "SYS_PTRACE" ]
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- SYS_PTRACE
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Recreate containers:
|
3. Recreate containers:
|
||||||
|
@ -126,7 +128,7 @@ However, Solr also requires a fair bit of RAM. While Solr is [highly tuneable](h
|
||||||
mailserver:
|
mailserver:
|
||||||
depends_on:
|
depends_on:
|
||||||
- solr
|
- solr
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
...
|
...
|
||||||
volumes:
|
volumes:
|
||||||
...
|
...
|
||||||
|
@ -146,7 +148,7 @@ However, Solr also requires a fair bit of RAM. While Solr is [highly tuneable](h
|
||||||
plugin {
|
plugin {
|
||||||
fts = solr
|
fts = solr
|
||||||
fts_autoindex = yes
|
fts_autoindex = yes
|
||||||
fts_solr = url=http://solr:8983/solr/dovecot/
|
fts_solr = url=http://solr:8983/solr/dovecot/
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ spec:
|
||||||
hostname: mailserver
|
hostname: mailserver
|
||||||
containers:
|
containers:
|
||||||
- name: mailserver
|
- name: mailserver
|
||||||
image: ghcr.io/docker-mailserver/docker-mailserver:10.0.0
|
image: ghcr.io/docker-mailserver/docker-mailserver:latest
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|
|
@ -36,7 +36,7 @@ You will need to first obtain the configuration from the running container: `mkd
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
mail:
|
mailserver:
|
||||||
volumes:
|
volumes:
|
||||||
- maildata:/var/mail
|
- maildata:/var/mail
|
||||||
- ./config/dovecot/10-master.conf:/etc/dovecot/conf.d/10-master.conf
|
- ./config/dovecot/10-master.conf:/etc/dovecot/conf.d/10-master.conf
|
||||||
|
|
|
@ -140,7 +140,7 @@ The following `docker-compose.yml` is the basic setup you need for using `letsen
|
||||||
version: "2"
|
version: "2"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx
|
image: nginx
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
ports:
|
ports:
|
||||||
|
@ -191,12 +191,12 @@ The second part of the setup is the actual mail container. So, in another folder
|
||||||
???+ example "Example Code"
|
???+ example "Example Code"
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '2'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
mailserver:
|
mailserver:
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
hostname: <HOSTNAME> # <-- change this
|
hostname: mail
|
||||||
domainname: <DOMAINNAME> # <-- change this
|
domainname: example.com
|
||||||
container_name: mailserver
|
container_name: mailserver
|
||||||
ports:
|
ports:
|
||||||
- "25:25"
|
- "25:25"
|
||||||
|
@ -380,14 +380,12 @@ This setup only comes with one caveat: The domain has to be configured on anothe
|
||||||
|
|
||||||
``` YAML
|
``` YAML
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
mailserver:
|
mailserver:
|
||||||
image: docker.io/mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
container_name: mailserver
|
|
||||||
hostname: mail
|
hostname: mail
|
||||||
domainname: domain.tld
|
domainname: example.com
|
||||||
|
container_name: mailserver
|
||||||
volumes:
|
volumes:
|
||||||
- /traefik/acme.json:/etc/letsencrypt/acme.json:ro
|
- /traefik/acme.json:/etc/letsencrypt/acme.json:ro
|
||||||
environment:
|
environment:
|
||||||
|
@ -395,9 +393,9 @@ This setup only comes with one caveat: The domain has to be configured on anothe
|
||||||
SSL_DOMAIN: mail.example.com"
|
SSL_DOMAIN: mail.example.com"
|
||||||
# for a wildcard certificate, use
|
# for a wildcard certificate, use
|
||||||
# SSL_DOMAIN: example.com
|
# SSL_DOMAIN: example.com
|
||||||
|
|
||||||
traefik:
|
traefik:
|
||||||
image: docker.io/traefik:v2.4.8
|
image: docker.io/traefik:v2.5
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
@ -416,7 +414,7 @@ This setup only comes with one caveat: The domain has to be configured on anothe
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
|
||||||
whoami:
|
whoami:
|
||||||
image: docker.io/traefik/whoami:latest
|
image: docker.io/traefik/whoami:latest
|
||||||
labels:
|
labels:
|
||||||
- "traefik.http.routers.whoami.rule=Host(`mail.domain.tld`)"
|
- "traefik.http.routers.whoami.rule=Host(`mail.domain.tld`)"
|
||||||
```
|
```
|
||||||
|
|
|
@ -44,7 +44,7 @@ DESCRIPTION
|
||||||
see the tagging convention in the README under
|
see the tagging convention in the README under
|
||||||
https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md
|
https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md
|
||||||
|
|
||||||
You will be able to see detailed information about the script you are invoking and
|
You will be able to see detailed information about the script you're invoking and
|
||||||
its arguments by appending help after your command. Currently, this
|
its arguments by appending help after your command. Currently, this
|
||||||
does not work with all scripts.
|
does not work with all scripts.
|
||||||
|
|
||||||
|
|
|
@ -25,37 +25,39 @@ We are going to use this docker based mailserver:
|
||||||
!!! example
|
!!! example
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '2'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mail:
|
mailserver:
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
hostname: mail
|
hostname: mail
|
||||||
domainname: example.org
|
domainname: example.com
|
||||||
container_name: mail
|
container_name: mailserver
|
||||||
ports:
|
ports:
|
||||||
- "25:25"
|
- "25:25"
|
||||||
- "587:587"
|
- "587:587"
|
||||||
- "465:465"
|
- "465:465"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/:/var/mail/
|
- ./data/maildata:/var/mail
|
||||||
- ./state/:/var/mail-state/
|
- ./data/mailstate:/var/mail-state
|
||||||
- ./config/:/tmp/docker-mailserver/
|
- ./data/maillogs:/var/log/mail
|
||||||
- /var/ds/wsproxy/letsencrypt/:/etc/letsencrypt/
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
- ./config/:/tmp/docker-mailserver/
|
||||||
|
- /var/ds/wsproxy/letsencrypt/:/etc/letsencrypt/
|
||||||
environment:
|
environment:
|
||||||
- PERMIT_DOCKER=network
|
- PERMIT_DOCKER=network
|
||||||
- SSL_TYPE=letsencrypt
|
- SSL_TYPE=letsencrypt
|
||||||
- ONE_DIR=1
|
- ONE_DIR=1
|
||||||
- DMS_DEBUG=1
|
- DMS_DEBUG=0
|
||||||
- SPOOF_PROTECTION=0
|
- SPOOF_PROTECTION=0
|
||||||
- REPORT_RECIPIENT=1
|
- REPORT_RECIPIENT=1
|
||||||
- ENABLE_SPAMASSASSIN=0
|
- ENABLE_SPAMASSASSIN=0
|
||||||
- ENABLE_CLAMAV=0
|
- ENABLE_CLAMAV=0
|
||||||
- ENABLE_FAIL2BAN=1
|
- ENABLE_FAIL2BAN=1
|
||||||
- ENABLE_POSTGREY=0
|
- ENABLE_POSTGREY=0
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
- SYS_PTRACE
|
- SYS_PTRACE
|
||||||
```
|
```
|
||||||
|
|
||||||
For more details about the environment variables that can be used, and their meaning and possible values, check also these:
|
For more details about the environment variables that can be used, and their meaning and possible values, check also these:
|
||||||
|
|
|
@ -54,13 +54,16 @@ Feel free to add your configuration if you archived the same goal using differen
|
||||||
[...]
|
[...]
|
||||||
```
|
```
|
||||||
|
|
||||||
Truncated list of neccessary labels on the mailserver container:
|
Truncated list of necessary labels on the mailserver container:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '2'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
mail:
|
mailserver:
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
|
hostname: mail
|
||||||
|
domainname: example.com
|
||||||
|
container_name: mailserver
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
|
|
@ -209,8 +209,8 @@ The following configuration works nicely:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
mail:
|
mailserver:
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./cron/sa-learn:/etc/cron.d/sa-learn
|
- ./cron/sa-learn:/etc/cron.d/sa-learn
|
||||||
```
|
```
|
||||||
|
@ -221,8 +221,8 @@ The following configuration works nicely:
|
||||||
version: "3.3"
|
version: "3.3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mail:
|
mailserver:
|
||||||
image: mailserver/docker-mailserver:latest
|
image: docker.io/mailserver/docker-mailserver:latest
|
||||||
# ...
|
# ...
|
||||||
configs:
|
configs:
|
||||||
- source: my_sa_crontab
|
- source: my_sa_crontab
|
||||||
|
|
Loading…
Reference in a new issue