2018-04-22 11:53:18 +02:00
|
|
|
{% set env='mailu.env' %}
|
|
|
|
# This file is auto-generated by the Mailu configuration wizard.
|
|
|
|
# Please read the documentation before attempting any change.
|
2018-10-18 17:23:25 +03:00
|
|
|
# Generated for {{ flavor }} flavor
|
2018-04-22 11:53:18 +02:00
|
|
|
|
2019-01-17 16:24:52 +02:00
|
|
|
version: '2.2'
|
2018-04-22 11:53:18 +02:00
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
# External dependencies
|
|
|
|
redis:
|
|
|
|
image: redis:alpine
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2018-10-16 11:09:42 +03:00
|
|
|
- "{{ root }}/redis:/data"
|
2022-01-06 12:48:35 +01:00
|
|
|
{% if resolver_enabled %}
|
|
|
|
depends_on:
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2021-12-01 15:59:47 +00:00
|
|
|
|
2018-04-22 11:53:18 +02:00
|
|
|
# Core services
|
|
|
|
front:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2018-10-22 15:13:18 +03:00
|
|
|
logging:
|
2023-04-02 17:08:30 +02:00
|
|
|
driver: journald
|
|
|
|
options:
|
2023-04-02 17:24:34 +02:00
|
|
|
tag: mailu-front
|
2018-04-22 11:53:18 +02:00
|
|
|
ports:
|
2023-04-20 15:36:17 +02:00
|
|
|
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993, 4190) %}
|
2018-04-22 11:53:18 +02:00
|
|
|
{% if bind4 %}
|
2018-10-16 12:34:55 +03:00
|
|
|
- "{{ bind4 }}:{{ port }}:{{ port }}"
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
2021-02-12 12:18:22 +01:00
|
|
|
{% if ipv6_enabled and bind6 %}
|
2023-01-25 14:05:42 +01:00
|
|
|
- "[{{ bind6 }}]:{{ port }}:{{ port }}"
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2023-01-04 15:03:47 +01:00
|
|
|
networks:
|
|
|
|
- default
|
2023-04-02 17:01:25 +02:00
|
|
|
{% if webmail_type != 'none' %}
|
2023-01-04 15:03:47 +01:00
|
|
|
- webmail
|
2023-04-02 17:01:25 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if webdav_enabled %}
|
2023-03-28 20:01:43 +00:00
|
|
|
- radicale
|
2023-04-02 17:01:25 +02:00
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2018-10-16 11:09:42 +03:00
|
|
|
- "{{ root }}/certs:/certs"
|
2020-04-11 14:34:50 +02:00
|
|
|
- "{{ root }}/overrides/nginx:/overrides:ro"
|
2022-01-06 09:42:59 +01:00
|
|
|
{% if resolver_enabled %}
|
2022-01-06 12:48:35 +01:00
|
|
|
depends_on:
|
2022-01-06 09:42:59 +01:00
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
2018-12-07 15:29:33 +02:00
|
|
|
|
2018-10-23 15:42:19 +03:00
|
|
|
resolver:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}unbound:${MAILU_VERSION:-{{ version }}}
|
2018-10-23 16:39:22 +03:00
|
|
|
env_file: {{ env }}
|
2023-10-27 14:10:13 +00:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
|
|
|
tag: mailu-resolver
|
2018-10-23 15:42:19 +03:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
ipv4_address: {{ dns }}
|
2022-01-06 09:42:59 +01:00
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
|
|
|
|
admin:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2023-04-02 17:08:30 +02:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
2023-04-02 17:24:34 +02:00
|
|
|
tag: mailu-admin
|
2018-10-16 18:03:59 +03:00
|
|
|
{% if not admin_enabled %}
|
2018-04-22 11:53:18 +02:00
|
|
|
ports:
|
|
|
|
- 127.0.0.1:8080:80
|
|
|
|
{% endif %}
|
|
|
|
volumes:
|
2018-10-16 11:09:42 +03:00
|
|
|
- "{{ root }}/data:/data"
|
|
|
|
- "{{ root }}/dkim:/dkim"
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- redis
|
2022-01-06 09:42:59 +01:00
|
|
|
{% if resolver_enabled %}
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
|
|
|
|
imap:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2023-04-02 17:08:30 +02:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
2023-04-02 17:24:34 +02:00
|
|
|
tag: mailu-imap
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2018-10-16 11:09:42 +03:00
|
|
|
- "{{ root }}/mail:/mail"
|
2020-04-11 14:34:50 +02:00
|
|
|
- "{{ root }}/overrides/dovecot:/overrides:ro"
|
2023-10-11 14:37:27 +02:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
{% if tika_enabled %}
|
|
|
|
- fts_attachments
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- front
|
2023-10-11 14:37:27 +02:00
|
|
|
{% if tika_enabled %}
|
|
|
|
- fts_attachments
|
|
|
|
{% endif %}
|
2022-01-06 12:48:35 +01:00
|
|
|
{% if resolver_enabled %}
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
|
|
|
|
smtp:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2023-04-02 17:08:30 +02:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
2023-04-02 17:24:34 +02:00
|
|
|
tag: mailu-smtp
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2019-10-11 08:45:58 +02:00
|
|
|
- "{{ root }}/mailqueue:/queue"
|
2020-04-11 14:34:50 +02:00
|
|
|
- "{{ root }}/overrides/postfix:/overrides:ro"
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- front
|
2018-10-23 17:46:06 +03:00
|
|
|
{% if resolver_enabled %}
|
2018-10-23 15:42:19 +03:00
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
|
2022-12-19 11:53:05 +01:00
|
|
|
{% if oletools_enabled %}
|
2022-11-23 15:42:46 +01:00
|
|
|
oletools:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}oletools:${MAILU_VERSION:-{{ version }}}
|
2022-11-23 15:42:46 +01:00
|
|
|
hostname: oletools
|
2023-10-13 09:43:34 +02:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
|
|
|
tag: mailu-oletools
|
2022-11-23 15:42:46 +01:00
|
|
|
restart: always
|
|
|
|
networks:
|
2023-10-13 16:24:10 +02:00
|
|
|
- oletools
|
2022-11-23 15:42:46 +01:00
|
|
|
depends_on:
|
|
|
|
{% if resolver_enabled %}
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2022-12-19 11:53:05 +01:00
|
|
|
{% endif %}
|
2022-11-23 15:42:46 +01:00
|
|
|
|
2023-10-11 14:37:27 +02:00
|
|
|
{% if tika_enabled %}
|
|
|
|
fts_attachments:
|
2024-05-21 21:14:13 +02:00
|
|
|
image: apache/tika:2.9.2.1-full
|
2023-10-11 14:37:27 +02:00
|
|
|
hostname: tika
|
2023-10-13 09:43:34 +02:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
|
|
|
tag: mailu-tika
|
2023-10-11 14:37:27 +02:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- fts_attachments
|
|
|
|
depends_on:
|
|
|
|
{% if resolver_enabled %}
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2023-10-13 09:43:34 +02:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "wget -nv -t1 -O /dev/null http://127.0.0.1:9998/tika || exit 1"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 3
|
|
|
|
start_period: 10s
|
2023-10-11 14:37:27 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2018-04-22 11:53:18 +02:00
|
|
|
antispam:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-{{ version }}}
|
2021-06-29 07:59:24 +00:00
|
|
|
hostname: antispam
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2023-04-02 17:08:30 +02:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
2023-04-02 17:24:34 +02:00
|
|
|
tag: mailu-antispam
|
2022-11-23 15:42:46 +01:00
|
|
|
networks:
|
|
|
|
- default
|
2023-10-13 16:24:10 +02:00
|
|
|
{% if oletools_enabled %}
|
|
|
|
- oletools
|
|
|
|
{% endif %}
|
|
|
|
{% if antivirus_enabled %}
|
|
|
|
- clamav
|
2022-12-19 11:53:05 +01:00
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2018-10-16 11:09:42 +03:00
|
|
|
- "{{ root }}/filter:/var/lib/rspamd"
|
2023-03-09 08:21:45 +00:00
|
|
|
- "{{ root }}/overrides/rspamd:/overrides:ro"
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- front
|
2022-12-20 09:40:29 +01:00
|
|
|
- redis
|
2022-12-19 12:05:27 +01:00
|
|
|
{% if oletools_enabled %}
|
2022-11-23 15:42:46 +01:00
|
|
|
- oletools
|
2022-12-19 12:05:27 +01:00
|
|
|
{% endif %}
|
2022-12-08 12:46:31 +01:00
|
|
|
{% if antivirus_enabled %}
|
|
|
|
- antivirus
|
|
|
|
{% endif %}
|
2018-10-23 15:42:19 +03:00
|
|
|
{% if resolver_enabled %}
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
|
2018-10-25 17:37:22 +03:00
|
|
|
# Optional services
|
2018-10-16 16:12:42 +03:00
|
|
|
{% if antivirus_enabled %}
|
2018-04-22 11:53:18 +02:00
|
|
|
antivirus:
|
2023-10-13 16:24:10 +02:00
|
|
|
image: clamav/clamav-debian:1.2.0-6
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2023-10-13 16:24:10 +02:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
2023-10-27 14:10:13 +00:00
|
|
|
tag: mailu-antivirus
|
2023-10-13 16:24:10 +02:00
|
|
|
networks:
|
|
|
|
- clamav
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2023-10-13 16:24:10 +02:00
|
|
|
- "{{ root }}/filter/clamav:/var/lib/clamav"
|
2023-10-13 16:35:13 +02:00
|
|
|
healthcheck:
|
2023-10-13 16:42:45 +02:00
|
|
|
test: ["CMD-SHELL", "kill -0 `cat /tmp/clamd.pid` && kill -0 `cat /tmp/freshclam.pid`"]
|
2023-10-13 16:35:13 +02:00
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 3
|
2023-10-13 16:42:45 +02:00
|
|
|
start_period: 10s
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2018-10-16 16:12:42 +03:00
|
|
|
{% if webdav_enabled %}
|
2018-04-22 11:53:18 +02:00
|
|
|
webdav:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2023-10-27 14:10:13 +00:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
|
|
|
tag: mailu-webdav
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2018-10-16 11:09:42 +03:00
|
|
|
- "{{ root }}/dav:/data"
|
2023-01-04 15:03:47 +01:00
|
|
|
networks:
|
|
|
|
- radicale
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2018-10-16 18:03:59 +03:00
|
|
|
{% if fetchmail_enabled %}
|
2018-04-22 11:53:18 +02:00
|
|
|
fetchmail:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2023-10-27 14:10:13 +00:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
|
|
|
tag: mailu-fetchmail
|
2021-11-09 14:10:04 +00:00
|
|
|
volumes:
|
2021-11-10 13:08:33 +00:00
|
|
|
- "{{ root }}/data/fetchmail:/data"
|
2018-10-23 15:42:19 +03:00
|
|
|
depends_on:
|
2022-11-13 17:15:50 +01:00
|
|
|
- admin
|
|
|
|
- smtp
|
|
|
|
- imap
|
|
|
|
{% if resolver_enabled %}
|
2018-10-23 15:42:19 +03:00
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
# Webmail
|
2018-10-17 15:11:55 +03:00
|
|
|
{% if webmail_type != 'none' %}
|
2018-04-22 11:53:18 +02:00
|
|
|
webmail:
|
2023-03-16 17:38:25 +00:00
|
|
|
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}webmail:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 15:13:18 +03:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2023-10-27 14:10:13 +00:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
options:
|
|
|
|
tag: mailu-webmail
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2018-10-16 11:09:42 +03:00
|
|
|
- "{{ root }}/webmail:/data"
|
2021-12-18 17:43:21 +01:00
|
|
|
- "{{ root }}/overrides/{{ webmail_type }}:/overrides:ro"
|
2023-01-04 15:03:47 +01:00
|
|
|
networks:
|
|
|
|
- webmail
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
2023-01-04 15:03:47 +01:00
|
|
|
- front
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
2018-12-06 16:44:12 +02:00
|
|
|
|
2018-10-23 15:42:19 +03:00
|
|
|
networks:
|
|
|
|
default:
|
2019-01-17 16:24:52 +02:00
|
|
|
{% if ipv6_enabled %}
|
|
|
|
enable_ipv6: true
|
|
|
|
{% endif %}
|
2018-10-23 15:42:19 +03:00
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
|
|
|
- subnet: {{ subnet }}
|
2019-01-17 16:24:52 +02:00
|
|
|
{% if ipv6_enabled %}
|
|
|
|
- subnet: {{ subnet6 }}
|
|
|
|
{% endif %}
|
2023-01-04 15:03:47 +01:00
|
|
|
{% if webdav_enabled %}
|
|
|
|
radicale:
|
|
|
|
driver: bridge
|
|
|
|
{% endif %}
|
|
|
|
{% if webmail_type != 'none' %}
|
|
|
|
webmail:
|
|
|
|
driver: bridge
|
|
|
|
{% endif %}
|
2023-10-13 16:24:10 +02:00
|
|
|
{% if antivirus_enabled %}
|
|
|
|
clamav:
|
|
|
|
driver: bridge
|
|
|
|
{% endif %}
|
2022-12-19 11:53:05 +01:00
|
|
|
{% if oletools_enabled %}
|
2023-10-13 16:24:10 +02:00
|
|
|
oletools:
|
2022-11-23 15:42:46 +01:00
|
|
|
driver: bridge
|
|
|
|
internal: true
|
2022-12-19 11:53:05 +01:00
|
|
|
{% endif %}
|
2023-10-11 14:37:27 +02:00
|
|
|
{% if tika_enabled %}
|
|
|
|
fts_attachments:
|
|
|
|
driver: bridge
|
|
|
|
internal: true
|
|
|
|
{% endif %}
|