1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-06 00:26:08 +02:00
2734: Fix setup r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Remove LOG_DRIVER which never worked and replace it with journald by default
Fix a bug where front may get attached to networks that don't exist (#2725 was incomplete)

### Related issue(s)
- #2725

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
This commit is contained in:
bors[bot] 2023-04-03 17:30:12 +00:00 committed by GitHub
commit 61a41349b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 18 deletions

View File

@ -135,12 +135,6 @@ WEBSITE=https://mailu.io
# Advanced settings
###################################
# Log driver for front service. Possible values:
# json-file (default)
# journald (On systemd platforms, useful for Fail2Ban integration)
# syslog (Non systemd platforms, Fail2Ban integration. Disables `docker compose log` for front!)
LOG_DRIVER=json-file
# Docker-compose project name, this will prepended to containers names.
COMPOSE_PROJECT_NAME=mailu

View File

@ -9,7 +9,9 @@ services:
restart: always
env_file: .env
logging:
driver: $LOG_DRIVER
driver: journald
options:
tag: mailu-front
ports:
- "$BIND_ADDRESS4:80:80"
- "$BIND_ADDRESS4:443:443"
@ -43,6 +45,10 @@ services:
image: mailu/dovecot:$VERSION
restart: always
env_file: .env
logging:
driver: journald
options:
tag: mailu-imap
volumes:
- "$ROOT/mail:/mail"
- "$ROOT/overrides/dovecot:/overrides:ro"
@ -53,6 +59,10 @@ services:
image: mailu/postfix:$VERSION
restart: always
env_file: .env
logging:
driver: journald
options:
tag: mailu-smtp
volumes:
- "$ROOT/mailqueue:/queue"
- "$ROOT/overrides/postfix:/overrides:ro"
@ -63,6 +73,10 @@ services:
image: mailu/rspamd:$VERSION
restart: always
env_file: .env
logging:
driver: journald
options:
tag: mailu-antispam
volumes:
- "$ROOT/filter:/var/lib/rspamd"
- "$ROOT/dkim:/dkim:ro"
@ -88,6 +102,10 @@ services:
image: mailu/admin:$VERSION
restart: always
env_file: .env
logging:
driver: journald
options:
tag: mailu-admin
volumes:
- "$ROOT/data:/data"
- "$ROOT/dkim:/dkim"

View File

@ -35,8 +35,6 @@ services:
image: mailu/nginx:$VERSION
restart: always
env_file: .env
logging:
driver: $LOG_DRIVER
labels: # Traefik labels for simple reverse-proxying
- "traefik.enable=true"
- "traefik.port=80"

View File

@ -579,8 +579,7 @@ down brute force attacks. The same applies to login attempts via the single sign
We *do* provide a possibility to export the logs from the ``front`` service and ``Admin`` service to the host.
The ``front`` container logs failed logon attempts on SMTP, IMAP and POP3.
The ``Admin`` container logs failed logon attempt on the single sign on page.
For this you need to set ``LOG_DRIVER=journald`` or ``syslog``, depending on the log
manager of the host. You will need to setup the proper Regex in the Fail2Ban configuration.
You will need to setup the proper Regex in the Fail2Ban configuration.
Below an example how to do so.
If you use a reverse proxy in front of Mailu, it is vital to set the environment variables REAL_IP_HEADER and REAL_IP_FROM.

View File

@ -26,7 +26,9 @@ services:
restart: always
env_file: {{ env }}
logging:
driver: {{ log_driver or 'json-file' }}
driver: journald
options:
tag: mailu-front
ports:
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
{% if bind4 %}
@ -38,8 +40,12 @@ services:
{% endfor %}
networks:
- default
{% if webmail_type != 'none' %}
- webmail
{% endif %}
{% if webdav_enabled %}
- radicale
{% endif %}
volumes:
- "{{ root }}/certs:/certs"
- "{{ root }}/overrides/nginx:/overrides:ro"
@ -62,6 +68,10 @@ services:
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
logging:
driver: journald
options:
tag: mailu-admin
{% if not admin_enabled %}
ports:
- 127.0.0.1:8080:80
@ -81,6 +91,10 @@ services:
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
logging:
driver: journald
options:
tag: mailu-imap
volumes:
- "{{ root }}/mail:/mail"
- "{{ root }}/overrides/dovecot:/overrides:ro"
@ -96,6 +110,10 @@ services:
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-{{ version }}}
restart: always
env_file: {{ env }}
logging:
driver: journald
options:
tag: mailu-smtp
volumes:
- "{{ root }}/mailqueue:/queue"
- "{{ root }}/overrides/postfix:/overrides:ro"
@ -127,6 +145,10 @@ services:
hostname: antispam
restart: always
env_file: {{ env }}
logging:
driver: journald
options:
tag: mailu-antispam
{% if oletools_enabled %}
networks:
- default

View File

@ -158,12 +158,6 @@ DOMAIN_REGISTRATION=true
# Advanced settings
###################################
# Log driver for front service. Possible values:
# json-file (default)
# journald (On systemd platforms, useful for Fail2Ban integration)
# syslog (Non systemd platforms, Fail2Ban integration. Disables `docker compose log` for front!)
# LOG_DRIVER={{ log_driver or 'json-file' }}
# Docker-compose project name, this will prepended to containers names.
COMPOSE_PROJECT_NAME={{ compose_project_name or 'mailu' }}

View File

@ -0,0 +1,2 @@
Remove LOG_DRIVER which never worked and replace it with journald by default
Fix a bug where front may get attached to networks that don't exist