From 1d6809193b1e02d87fdcca3f5a896ee8bd411947 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Tue, 2 Nov 2021 11:18:21 +0100 Subject: [PATCH 01/12] Add tzdata to core --- core/admin/Dockerfile | 2 +- core/dovecot/Dockerfile | 2 +- core/nginx/Dockerfile | 2 +- core/postfix/Dockerfile | 2 +- core/rspamd/Dockerfile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/admin/Dockerfile b/core/admin/Dockerfile index a4f28481..87676eb5 100644 --- a/core/admin/Dockerfile +++ b/core/admin/Dockerfile @@ -25,7 +25,7 @@ COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm # python3 shared with most images RUN set -eu \ - && apk add --no-cache python3 py3-pip git bash \ + && apk add --no-cache python3 py3-pip git bash tzdata \ && pip3 install --upgrade pip RUN mkdir -p /app diff --git a/core/dovecot/Dockerfile b/core/dovecot/Dockerfile index 49fcb866..da376d81 100644 --- a/core/dovecot/Dockerfile +++ b/core/dovecot/Dockerfile @@ -13,7 +13,7 @@ RUN git clone https://github.com/grosjo/fts-xapian.git \ FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git bash py3-multidict py3-yarl \ + python3 py3-pip git bash py3-multidict py3-yarl tzdata \ && pip3 install --upgrade pip # Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube diff --git a/core/nginx/Dockerfile b/core/nginx/Dockerfile index b7e5e22e..6043cd8d 100644 --- a/core/nginx/Dockerfile +++ b/core/nginx/Dockerfile @@ -9,7 +9,7 @@ RUN apk add --no-cache \ RUN pip3 install socrate==0.2.0 # Image specific layers under this line -RUN apk add --no-cache certbot nginx nginx-mod-mail openssl curl \ +RUN apk add --no-cache certbot nginx nginx-mod-mail openssl curl tzdata \ && pip3 install watchdog COPY conf /conf diff --git a/core/postfix/Dockerfile b/core/postfix/Dockerfile index bdf45e35..e1e1d6f9 100644 --- a/core/postfix/Dockerfile +++ b/core/postfix/Dockerfile @@ -2,7 +2,7 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git bash py3-multidict py3-yarl \ + python3 py3-pip git bash py3-multidict py3-yarl tzdata \ && pip3 install --upgrade pip # Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube diff --git a/core/rspamd/Dockerfile b/core/rspamd/Dockerfile index 0b3b94f7..296949a2 100644 --- a/core/rspamd/Dockerfile +++ b/core/rspamd/Dockerfile @@ -2,7 +2,7 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git bash py3-multidict \ + python3 py3-pip git bash py3-multidict tzdata \ && pip3 install --upgrade pip # Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube From 50d76076ed748c4cfceab08665ba32650febc293 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Tue, 2 Nov 2021 11:19:42 +0100 Subject: [PATCH 02/12] Add tzdata to optional --- optional/clamav/Dockerfile | 2 +- optional/fetchmail/Dockerfile | 2 +- optional/postgresql/Dockerfile | 2 +- optional/radicale/Dockerfile | 2 +- optional/traefik-certdumper/Dockerfile | 2 +- optional/unbound/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/optional/clamav/Dockerfile b/optional/clamav/Dockerfile index efad01ad..7ce41453 100644 --- a/optional/clamav/Dockerfile +++ b/optional/clamav/Dockerfile @@ -2,7 +2,7 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip bash \ + python3 py3-pip bash tzdata \ && pip3 install --upgrade pip # Image specific layers under this line RUN apk add --no-cache clamav rsyslog wget clamav-libunrar diff --git a/optional/fetchmail/Dockerfile b/optional/fetchmail/Dockerfile index d3397a22..fc564a4b 100644 --- a/optional/fetchmail/Dockerfile +++ b/optional/fetchmail/Dockerfile @@ -3,7 +3,7 @@ FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip bash \ + python3 py3-pip bash tzdata \ && pip3 install --upgrade pip # Image specific layers under this line diff --git a/optional/postgresql/Dockerfile b/optional/postgresql/Dockerfile index ab197b62..ade12a24 100644 --- a/optional/postgresql/Dockerfile +++ b/optional/postgresql/Dockerfile @@ -2,7 +2,7 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip bash py3-multidict \ + python3 py3-pip bash py3-multidict tzdata \ && pip3 install --upgrade pip # Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube diff --git a/optional/radicale/Dockerfile b/optional/radicale/Dockerfile index 21c1d437..cecaa2d3 100644 --- a/optional/radicale/Dockerfile +++ b/optional/radicale/Dockerfile @@ -3,7 +3,7 @@ FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip bash \ + python3 py3-pip bash tzdata \ && pip3 install --upgrade pip # Image specific layers under this line diff --git a/optional/traefik-certdumper/Dockerfile b/optional/traefik-certdumper/Dockerfile index a7127ce1..ce9b4929 100644 --- a/optional/traefik-certdumper/Dockerfile +++ b/optional/traefik-certdumper/Dockerfile @@ -1,6 +1,6 @@ FROM ldez/traefik-certs-dumper -RUN apk --no-cache add inotify-tools util-linux bash +RUN apk --no-cache add inotify-tools util-linux bash tzdata COPY run.sh / diff --git a/optional/unbound/Dockerfile b/optional/unbound/Dockerfile index da979496..fde67480 100644 --- a/optional/unbound/Dockerfile +++ b/optional/unbound/Dockerfile @@ -2,7 +2,7 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ - python3 py3-pip git bash py3-multidict \ + python3 py3-pip git bash py3-multidict tzdata \ && pip3 install --upgrade pip # Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube From 5b99b6427cd8030e89f64cab378d3df00c695104 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Tue, 2 Nov 2021 11:20:53 +0100 Subject: [PATCH 03/12] Update docs --- docs/configuration.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index fa574415..57c33755 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -62,6 +62,8 @@ there is a good way to disable rate limiting altogether. The ``TLS_FLAVOR`` sets how Mailu handles TLS connections. Setting this value to ``notls`` will cause Mailu not to server any web content! More on :ref:`tls_flavor`. +The ``TZ`` sets the timezone Mailu will use. The timezone naming convention usually uses a ``Region/City`` format. This defaults to ``Etc/UTC`` + Mail settings ------------- From 12cbcec911cd26e58dc64eb3af2997cf0fe27503 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Tue, 2 Nov 2021 11:21:38 +0100 Subject: [PATCH 04/12] Add newsfragment --- towncrier/newsfragments/1154.enhancement | 1 + 1 file changed, 1 insertion(+) create mode 100644 towncrier/newsfragments/1154.enhancement diff --git a/towncrier/newsfragments/1154.enhancement b/towncrier/newsfragments/1154.enhancement new file mode 100644 index 00000000..d19b3d09 --- /dev/null +++ b/towncrier/newsfragments/1154.enhancement @@ -0,0 +1 @@ +Add support for timezones \ No newline at end of file From c43f7aef5accb6c3c4af11001d97d1ccd1c735a2 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Tue, 2 Nov 2021 14:46:28 +0100 Subject: [PATCH 05/12] Update docs --- docs/configuration.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 57c33755..5bf2cb77 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -62,7 +62,9 @@ there is a good way to disable rate limiting altogether. The ``TLS_FLAVOR`` sets how Mailu handles TLS connections. Setting this value to ``notls`` will cause Mailu not to server any web content! More on :ref:`tls_flavor`. -The ``TZ`` sets the timezone Mailu will use. The timezone naming convention usually uses a ``Region/City`` format. This defaults to ``Etc/UTC`` +The ``TZ`` sets the timezone Mailu will use. The timezone naming convention usually uses a ``Region/City`` format. See `TZ database name`_ for a list of valid timezones This defaults to ``Etc/UTC`` + +.. _`TZ database name`: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones Mail settings ------------- From a1f0c2058384a72c9526bc0b2c2d552eab426022 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Tue, 2 Nov 2021 15:32:27 +0100 Subject: [PATCH 06/12] Add tzdata to webmails --- webmails/rainloop/Dockerfile | 2 +- webmails/roundcube/Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/webmails/rainloop/Dockerfile b/webmails/rainloop/Dockerfile index f1394d64..109546db 100644 --- a/webmails/rainloop/Dockerfile +++ b/webmails/rainloop/Dockerfile @@ -6,7 +6,7 @@ ONBUILD COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/ # Shared later between dovecot postfix nginx rspamd rainloop and roundloop RUN apk add --no-cache \ - python3 py3-pip \ + python3 py3-pip tzdata \ && pip3 install socrate==0.2.0 # https://www.rainloop.net/docs/system-requirements/ diff --git a/webmails/roundcube/Dockerfile b/webmails/roundcube/Dockerfile index 1f788918..b8ba512f 100644 --- a/webmails/roundcube/Dockerfile +++ b/webmails/roundcube/Dockerfile @@ -9,7 +9,7 @@ FROM ${ARCH}php:7.4-apache as build_other FROM build_${QEMU} #Shared layer between rainloop and roundcube RUN apt-get update && apt-get install -y \ - python3 curl python3-pip git python3-multidict \ + python3 curl python3-pip git python3-multidict tzdata \ && rm -rf /var/lib/apt/lists \ && echo "ServerSignature Off\nServerName roundcube" >> /etc/apache2/apache2.conf \ && sed -i 's,CustomLog.*combined$,\0 "'"expr=!(%{HTTP_USER_AGENT}=='health'\&\&(-R '127.0.0.1/8' || -R '::1'))"'",' /etc/apache2/sites-available/000-default.conf @@ -21,12 +21,14 @@ ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1 ENV CARDDAV_URL https://github.com/mstilkerich/rcmcarddav/releases/download/v4.1.2/carddav-v4.1.2.tar.gz +ENV TZ Etc/UTC + RUN apt-get update && apt-get install -y \ zlib1g-dev libzip4 libzip-dev libpq-dev \ python3-jinja2 \ gpg \ && docker-php-ext-install zip pdo_mysql pdo_pgsql \ - && echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \ + && echo date.timezone=${TZ} > /usr/local/etc/php/conf.d/timezone.ini \ && rm -rf /var/www/html/ \ && cd /var/www \ && curl -sL ${ROUNDCUBE_URL} | tar xz \ From 81e33d36790693b2a4fadd4da57325ae184a3d86 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 4 Nov 2021 13:21:37 +0100 Subject: [PATCH 07/12] Add default TZ to config manager --- core/admin/mailu/configuration.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index 9829f798..c4d4a830 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -44,6 +44,7 @@ DEFAULT_CONFIG = { 'AUTH_RATELIMIT_EXEMPTION': '', 'AUTH_RATELIMIT_EXEMPTION_LENGTH': 86400, 'DISABLE_STATISTICS': False, + 'TZ': 'Etc/UTC', # Mail settings 'DMARC_RUA': None, 'DMARC_RUF': None, From 679eae51810021090c111033b099d00e544e3fa7 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 4 Nov 2021 13:26:40 +0100 Subject: [PATCH 08/12] Add TZ to mailu.env --- setup/flavors/compose/mailu.env | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/flavors/compose/mailu.env b/setup/flavors/compose/mailu.env index 3e53e7d2..c462c5e2 100644 --- a/setup/flavors/compose/mailu.env +++ b/setup/flavors/compose/mailu.env @@ -42,6 +42,9 @@ AUTH_RATELIMIT_USER={{ auth_ratelimit_user }}/day # Opt-out of statistics, replace with "True" to opt out DISABLE_STATISTICS={{ disable_statistics or 'False' }} +# Timezone for the Mailu containers. See this link for all possible values https://en.wikipedia.org/wiki/List_of_tz_database_time_zones +TZ=Etc/UTC + ################################### # Optional features ################################### From 225160610b0dd44da446299a04eed9bfa1ead694 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 4 Nov 2021 14:22:12 +0100 Subject: [PATCH 09/12] Set default TZ in Dockerfiles --- core/admin/Dockerfile | 2 ++ core/dovecot/Dockerfile | 3 +++ core/nginx/Dockerfile | 3 +++ core/postfix/Dockerfile | 3 +++ core/rspamd/Dockerfile | 3 +++ optional/clamav/Dockerfile | 3 +++ optional/fetchmail/Dockerfile | 2 ++ optional/postgresql/Dockerfile | 3 +++ optional/radicale/Dockerfile | 2 ++ optional/traefik-certdumper/Dockerfile | 2 ++ optional/unbound/Dockerfile | 3 +++ webmails/rainloop/Dockerfile | 2 ++ webmails/roundcube/Dockerfile | 5 +++-- 13 files changed, 34 insertions(+), 2 deletions(-) diff --git a/core/admin/Dockerfile b/core/admin/Dockerfile index 87676eb5..8dda76d2 100644 --- a/core/admin/Dockerfile +++ b/core/admin/Dockerfile @@ -23,6 +23,8 @@ RUN set -eu \ FROM $DISTRO COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static +ENV TZ Etc/UTC + # python3 shared with most images RUN set -eu \ && apk add --no-cache python3 py3-pip git bash tzdata \ diff --git a/core/dovecot/Dockerfile b/core/dovecot/Dockerfile index da376d81..7a2dbdc1 100644 --- a/core/dovecot/Dockerfile +++ b/core/dovecot/Dockerfile @@ -11,6 +11,9 @@ RUN git clone https://github.com/grosjo/fts-xapian.git \ && make install FROM $DISTRO + +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash py3-multidict py3-yarl tzdata \ diff --git a/core/nginx/Dockerfile b/core/nginx/Dockerfile index 6043cd8d..d8899144 100644 --- a/core/nginx/Dockerfile +++ b/core/nginx/Dockerfile @@ -1,5 +1,8 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO + +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash py3-multidict \ diff --git a/core/postfix/Dockerfile b/core/postfix/Dockerfile index e1e1d6f9..9f0cc701 100644 --- a/core/postfix/Dockerfile +++ b/core/postfix/Dockerfile @@ -1,5 +1,8 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO + +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash py3-multidict py3-yarl tzdata \ diff --git a/core/rspamd/Dockerfile b/core/rspamd/Dockerfile index 296949a2..33174c1a 100644 --- a/core/rspamd/Dockerfile +++ b/core/rspamd/Dockerfile @@ -1,5 +1,8 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO + +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash py3-multidict tzdata \ diff --git a/optional/clamav/Dockerfile b/optional/clamav/Dockerfile index 7ce41453..e17d2d70 100644 --- a/optional/clamav/Dockerfile +++ b/optional/clamav/Dockerfile @@ -1,5 +1,8 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO + +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip bash tzdata \ diff --git a/optional/fetchmail/Dockerfile b/optional/fetchmail/Dockerfile index fc564a4b..995ec48f 100644 --- a/optional/fetchmail/Dockerfile +++ b/optional/fetchmail/Dockerfile @@ -1,6 +1,8 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip bash tzdata \ diff --git a/optional/postgresql/Dockerfile b/optional/postgresql/Dockerfile index ade12a24..3ddbb40a 100644 --- a/optional/postgresql/Dockerfile +++ b/optional/postgresql/Dockerfile @@ -1,5 +1,8 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO + +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip bash py3-multidict tzdata \ diff --git a/optional/radicale/Dockerfile b/optional/radicale/Dockerfile index cecaa2d3..4eb8d5a7 100644 --- a/optional/radicale/Dockerfile +++ b/optional/radicale/Dockerfile @@ -1,6 +1,8 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip bash tzdata \ diff --git a/optional/traefik-certdumper/Dockerfile b/optional/traefik-certdumper/Dockerfile index ce9b4929..506c09c2 100644 --- a/optional/traefik-certdumper/Dockerfile +++ b/optional/traefik-certdumper/Dockerfile @@ -1,5 +1,7 @@ FROM ldez/traefik-certs-dumper +ENV TZ Etc/UTC + RUN apk --no-cache add inotify-tools util-linux bash tzdata COPY run.sh / diff --git a/optional/unbound/Dockerfile b/optional/unbound/Dockerfile index fde67480..bf5d4840 100644 --- a/optional/unbound/Dockerfile +++ b/optional/unbound/Dockerfile @@ -1,5 +1,8 @@ ARG DISTRO=alpine:3.14.2 FROM $DISTRO + +ENV TZ Etc/UTC + # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash py3-multidict tzdata \ diff --git a/webmails/rainloop/Dockerfile b/webmails/rainloop/Dockerfile index 109546db..02910e39 100644 --- a/webmails/rainloop/Dockerfile +++ b/webmails/rainloop/Dockerfile @@ -4,6 +4,8 @@ ARG ARCH="" FROM ${ARCH}alpine:3.14 ONBUILD COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static +ENV TZ Etc/UTC + # Shared later between dovecot postfix nginx rspamd rainloop and roundloop RUN apk add --no-cache \ python3 py3-pip tzdata \ diff --git a/webmails/roundcube/Dockerfile b/webmails/roundcube/Dockerfile index b8ba512f..f5fba3b0 100644 --- a/webmails/roundcube/Dockerfile +++ b/webmails/roundcube/Dockerfile @@ -7,6 +7,9 @@ ONBUILD COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/ FROM ${ARCH}php:7.4-apache as build_other FROM build_${QEMU} + +ENV TZ Etc/UTC + #Shared layer between rainloop and roundcube RUN apt-get update && apt-get install -y \ python3 curl python3-pip git python3-multidict tzdata \ @@ -21,8 +24,6 @@ ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1 ENV CARDDAV_URL https://github.com/mstilkerich/rcmcarddav/releases/download/v4.1.2/carddav-v4.1.2.tar.gz -ENV TZ Etc/UTC - RUN apt-get update && apt-get install -y \ zlib1g-dev libzip4 libzip-dev libpq-dev \ python3-jinja2 \ From a6beb234ffafe192fe5755c29aea77bd528527be Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 4 Nov 2021 16:17:11 +0100 Subject: [PATCH 10/12] Set timezone in roundcube.ini --- webmails/roundcube/Dockerfile | 1 - webmails/roundcube/php.ini | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/webmails/roundcube/Dockerfile b/webmails/roundcube/Dockerfile index f5fba3b0..4ad89022 100644 --- a/webmails/roundcube/Dockerfile +++ b/webmails/roundcube/Dockerfile @@ -29,7 +29,6 @@ RUN apt-get update && apt-get install -y \ python3-jinja2 \ gpg \ && docker-php-ext-install zip pdo_mysql pdo_pgsql \ - && echo date.timezone=${TZ} > /usr/local/etc/php/conf.d/timezone.ini \ && rm -rf /var/www/html/ \ && cd /var/www \ && curl -sL ${ROUNDCUBE_URL} | tar xz \ diff --git a/webmails/roundcube/php.ini b/webmails/roundcube/php.ini index 27992231..dafa0578 100644 --- a/webmails/roundcube/php.ini +++ b/webmails/roundcube/php.ini @@ -1,5 +1,4 @@ expose_php=Off -date.timezone=UTC +date.timezone={{ TZ }} upload_max_filesize = {{ MAX_FILESIZE }}M post_max_size = {{ MAX_FILESIZE }}M - From 548077c465fdfa892e51ad0d2ab95c6ab4385f07 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Fri, 5 Nov 2021 09:45:53 +0100 Subject: [PATCH 11/12] Update docs --- docs/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 5bf2cb77..71497354 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -62,7 +62,7 @@ there is a good way to disable rate limiting altogether. The ``TLS_FLAVOR`` sets how Mailu handles TLS connections. Setting this value to ``notls`` will cause Mailu not to server any web content! More on :ref:`tls_flavor`. -The ``TZ`` sets the timezone Mailu will use. The timezone naming convention usually uses a ``Region/City`` format. See `TZ database name`_ for a list of valid timezones This defaults to ``Etc/UTC`` +The ``TZ`` sets the timezone Mailu will use. The timezone naming convention usually uses a ``Region/City`` format. See `TZ database name`_ for a list of valid timezones This defaults to ``Etc/UTC``. Warning: if you are observing different timestamps in your log files you should change your hosts timezone to UTC instead of changing TZ to your local timezone. Using UTC allows easy log correlation with remote MTAs. .. _`TZ database name`: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones From 30d7e72765bba44089e86f49accecc569d731848 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Fri, 5 Nov 2021 14:44:12 +0100 Subject: [PATCH 12/12] Move TZ to Advanced settings --- core/admin/mailu/configuration.py | 2 +- docs/configuration.rst | 8 ++++---- setup/flavors/compose/mailu.env | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index c4d4a830..54856c09 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -44,7 +44,6 @@ DEFAULT_CONFIG = { 'AUTH_RATELIMIT_EXEMPTION': '', 'AUTH_RATELIMIT_EXEMPTION_LENGTH': 86400, 'DISABLE_STATISTICS': False, - 'TZ': 'Etc/UTC', # Mail settings 'DMARC_RUA': None, 'DMARC_RUF': None, @@ -73,6 +72,7 @@ DEFAULT_CONFIG = { 'SESSION_LIFETIME': 24, 'SESSION_COOKIE_SECURE': True, 'CREDENTIAL_ROUNDS': 12, + 'TZ': 'Etc/UTC', # Host settings 'HOST_IMAP': 'imap', 'HOST_LMTP': 'imap:2525', diff --git a/docs/configuration.rst b/docs/configuration.rst index 71497354..03817988 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -62,10 +62,6 @@ there is a good way to disable rate limiting altogether. The ``TLS_FLAVOR`` sets how Mailu handles TLS connections. Setting this value to ``notls`` will cause Mailu not to server any web content! More on :ref:`tls_flavor`. -The ``TZ`` sets the timezone Mailu will use. The timezone naming convention usually uses a ``Region/City`` format. See `TZ database name`_ for a list of valid timezones This defaults to ``Etc/UTC``. Warning: if you are observing different timestamps in your log files you should change your hosts timezone to UTC instead of changing TZ to your local timezone. Using UTC allows easy log correlation with remote MTAs. - -.. _`TZ database name`: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - Mail settings ------------- @@ -198,6 +194,10 @@ The ``LETSENCRYPT_SHORTCHAIN`` (default: False) setting controls whether we send The ``REAL_IP_HEADER`` (default: unset) and ``REAL_IP_FROM`` (default: unset) settings controls whether HTTP headers such as ``X-Forwarded-For`` or ``X-Real-IP`` should be trusted. The former should be the name of the HTTP header to extract the client IP address from and the later a comma separated list of IP addresses designing which proxies to trust. If you are using Mailu behind a reverse proxy, you should set both. Setting the former without the later introduces a security vulnerability allowing a potential attacker to spoof his source address. +The ``TZ`` sets the timezone Mailu will use. The timezone naming convention usually uses a ``Region/City`` format. See `TZ database name`_ for a list of valid timezones This defaults to ``Etc/UTC``. Warning: if you are observing different timestamps in your log files you should change your hosts timezone to UTC instead of changing TZ to your local timezone. Using UTC allows easy log correlation with remote MTAs. + +.. _`TZ database name`: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + Antivirus settings ------------------ diff --git a/setup/flavors/compose/mailu.env b/setup/flavors/compose/mailu.env index c462c5e2..a8709ab3 100644 --- a/setup/flavors/compose/mailu.env +++ b/setup/flavors/compose/mailu.env @@ -42,9 +42,6 @@ AUTH_RATELIMIT_USER={{ auth_ratelimit_user }}/day # Opt-out of statistics, replace with "True" to opt out DISABLE_STATISTICS={{ disable_statistics or 'False' }} -# Timezone for the Mailu containers. See this link for all possible values https://en.wikipedia.org/wiki/List_of_tz_database_time_zones -TZ=Etc/UTC - ################################### # Optional features ################################### @@ -173,6 +170,9 @@ REJECT_UNLISTED_RECIPIENT={{ reject_unlisted_recipient }} # Log level threshold in start.py (value: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET) LOG_LEVEL=WARNING +# Timezone for the Mailu containers. See this link for all possible values https://en.wikipedia.org/wiki/List_of_tz_database_time_zones +TZ=Etc/UTC + ################################### # Database settings ###################################