1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-25 02:29:32 +02:00
mailcow-dockerized/data/Dockerfiles/dovecot/Dockerfile

139 lines
4.4 KiB
Docker
Raw Normal View History

🐄 Moorch Update 2022 - ClamAV, Dovecot & Olefy Update (#4497) * [API] Fix minor issue in api docs * [GH-Actions][stale] Add neverstale label to exempt list * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag error handling * [Web] add github version tag error handling * Passwordless SOGo auth: support for calendar invitations and calendar/contacts subscriptions Inviting someone to a calendar event triggers a request to /SOGo/so/otheruser@example.com/freebusy.ifb/ajaxRead. Subscribing to someone's calendar/contacts triggers a request to /SOGo/so/otheruser@example.com/foldersSearch. The email address in the URL is different from the logged-in user, which needs to be handled appropriately by sogo-auth.php. * [Web] add github version tag - adjust css * [Compose] Update SOGo Autoreply Schedule to 5m Based on the advice of inverse (SOGo developer). Thanks to https://github.com/jmber Closes: https://github.com/mailcow/mailcow-dockerized/issues/4436 * [Web] add github version tag - move twig globals * [Web] add github version tag - missing </div> * Passwordless SOGo auth: improvements for when accessing other users * [WebAuthn] fido2 passwordless auth - fix (#4440) * [WebAuthn] fido2 revert * [WebAuthn] set UV flags to 'discouraged' * [WebAuthn] revert - set UV flags to 'discouraged' * Update clamav to 0.104.2 * Update clamav to 0.104.2 * Update dovecot to 2.3.18 Update gosu to 1.14 Use debian bullseye as base * [Web] Updated lang.es.json [CI SKIP] (#4453) Co-authored-by: Fijxu <fijxu@zzls.xyz> Co-authored-by: milkmaker <milkmaker@mailcow.de> Co-authored-by: Fijxu <fijxu@zzls.xyz> * Fix broken documentation links (#4458) * Fix broken documentation links * Fix a few more broken documentation links * Fix broken documentation links in translation files * Fall back to empty string if WATCHDOG_NOTIFY_EMAIL undefined (#4457) By default, `.env` (`mailcow.conf`) does not define `WATCHDOG_NOTIFY_EMAIL`. Using it in `docker-compose.yml` without having it defined leads to Compose v2 displaying this warning on startup: > WARNING: The WATCHDOG_NOTIFY_EMAIL variable is not set. Defaulting to a blank string. Related to https://github.com/mailcow/mailcow-dockerized/issues/4315 * [Web] Updated lang.sk.json [CI SKIP] (#4461) Co-authored-by: Lukáš Matula <lukas@gbely.net> Co-authored-by: milkmaker <milkmaker@mailcow.de> Co-authored-by: Lukáš Matula <lukas@gbely.net> * oletools: disable template injection detection (#4464) Seems to be causing a lot of false positives lately * Fix minor typo in comment (#4466) Correction of the comment, so that the explanation is correct and can be understood. * Update issue templates to issue forms (#4465) This PR updates the issue templates to GitHubs new issue forms * [Web] Fix padding issue in UI admin panel (#4481) * [Web] fix admin panel padding issue * [Web] fix admin panel padding issue * [Web] Updated lang.sk.json [CI SKIP] (#4489) Co-authored-by: Lukáš Matula <lukas@gbely.net> Co-authored-by: milkmaker <milkmaker@mailcow.de> Co-authored-by: Lukáš Matula <lukas@gbely.net> * increase opcache.interned_strings_buffer to 16 (#4487) since version 23.0.2 Nextcloud recommends having a value greater than 8 for `opcache.interned_strings_buffer`. As this memory will be only used when needed this should have no impact on installations that are not using nextcloud. related discussion: https://help.nextcloud.com/t/nextcloud-23-02-opcache-interned-strings-buffer/134007/19 related nextcloud issue: https://github.com/nextcloud/server/issues/31223 * nextcloud - add missing redirections (#4366) adds missing location directives to the nginx configuration of nextcloud 22, to prevent warnings in nextcloud admin center of missing redirections * Update imapsync to 2.178 (#4491) * Update and fix oletools (#4479) As noticed by @MAGICCC (#4464 (comment)), our olefy image does not work anymore if you rebuild it. This is because @HeinleinSupport recently updated their repository with the changes from @decalage2's repository, which renamed olvba3 to olevba. Since @HeinleinSupport does not recommend using its own patched branch and is very slow in pulling in changes from upstream (@decalage2), let's switch to the latter. This also allowed me to revert #4464. Finally, a minor patch to rspamd is necessary. While the documentation says In the extended mode the oletools module will not trigger on specific categories, but will always set a threat string with all found flags when at least a macro was found. This is not actually true -- it only sets it when suspicious or autoexec threats were detected. But it's a one-line patch to make rspamd behave as documented and we should submit that patch to @rspamd too. With this patch, I have confirmed that Mailcow will reject any incoming, non-whitelisted message containing attachments with macros. * [Web] Fix excluded domain list in quaratine view Previously excluded domains from quarantine were not shown. * [Dovecot] Update syslogng Version to 3.28 (#4496) Co-authored-by: Niklas Meyer <niklas.meyer@tinc.gmbh> Co-authored-by: ntimo <git@nowitzki.me> Co-authored-by: Peter <magic@kthx.at> Co-authored-by: FreddleSpl0it <patschul@posteo.de> Co-authored-by: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Co-authored-by: Michael Kuron <mkuron@users.noreply.github.com> Co-authored-by: milkmaker <milkmaker@mailcow.de> Co-authored-by: Fijxu <fijxu@zzls.xyz> Co-authored-by: Slavi Pantaleev <slavi@devture.com> Co-authored-by: Lukáš Matula <lukas@gbely.net> Co-authored-by: Max <mail@heavygale.de> Co-authored-by: Michael Cramer <michael@bigmichi1.de> Co-authored-by: Robert Christian <soulsymphonies@users.noreply.github.com> Co-authored-by: André <andre.peters@debinux.de> Co-authored-by: Niklas Meyer <niklas.meyer@tinc.gmbh>
2022-03-02 17:32:17 +02:00
FROM debian:bullseye-slim
LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>"
2017-03-02 12:23:23 +02:00
ARG DEBIAN_FRONTEND=noninteractive
2023-11-12 19:00:20 +02:00
# renovate: datasource=github-tags depName=dovecot/core versioning=semver-coerced extractVersion=(?<version>.*)$
2023-10-11 12:14:47 +02:00
ARG DOVECOT=2.3.21
2023-11-12 19:00:20 +02:00
# renovate: datasource=github-releases depName=tianon/gosu versioning=semver-coerced extractVersion=(?<version>.*)$
ARG GOSU_VERSION=1.17
2017-03-02 12:23:23 +02:00
ENV LC_ALL C
2019-07-28 21:34:42 +02:00
# Add groups and users before installing Dovecot to not break compatibility
RUN groupadd -g 5000 vmail \
&& groupadd -g 401 dovecot \
&& groupadd -g 402 dovenull \
&& groupadd -g 999 sogo \
&& usermod -a -G sogo nobody \
2019-07-28 21:34:42 +02:00
&& useradd -g vmail -u 5000 vmail -d /var/vmail \
&& useradd -c "Dovecot unprivileged user" -d /dev/null -u 401 -g dovecot -s /bin/false dovecot \
&& useradd -c "Dovecot login user" -d /dev/null -u 402 -g dovenull -s /bin/false dovenull \
&& touch /etc/default/locale \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
build-essential \
2019-07-28 21:34:42 +02:00
apt-transport-https \
ca-certificates \
cpanminus \
curl \
dnsutils \
2019-07-28 21:34:42 +02:00
dirmngr \
gettext \
2019-07-28 21:34:42 +02:00
gnupg2 \
jq \
libauthen-ntlm-perl \
2019-05-05 22:30:11 +02:00
libcgi-pm-perl \
libcrypt-openssl-rsa-perl \
libcrypt-ssleay-perl \
2019-05-05 22:30:11 +02:00
libdata-uniqid-perl \
libdbd-mysql-perl \
libdbi-perl \
libdigest-hmac-perl \
2019-05-05 22:30:11 +02:00
libdist-checkconflicts-perl \
libencode-imaputf7-perl \
libfile-copy-recursive-perl \
2019-05-05 22:30:11 +02:00
libfile-tail-perl \
libhtml-parser-perl \
libio-compress-perl \
libio-socket-inet6-perl \
libio-socket-ssl-perl \
libio-tee-perl \
libipc-run-perl \
2019-05-05 22:30:11 +02:00
libjson-webtoken-perl \
liblockfile-simple-perl \
2019-05-05 22:30:11 +02:00
libmail-imapclient-perl \
libmodule-implementation-perl \
libmodule-scandeps-perl \
libnet-ssleay-perl \
2019-05-05 22:30:11 +02:00
libpackage-stash-perl \
libpackage-stash-xs-perl \
libpar-packer-perl \
2019-05-05 22:30:11 +02:00
libparse-recdescent-perl \
libproc-processtable-perl \
libreadonly-perl \
2019-05-05 22:30:11 +02:00
libregexp-common-perl \
libssl-dev \
2019-05-05 22:30:11 +02:00
libsys-meminfo-perl \
libterm-readkey-perl \
2019-05-05 22:30:11 +02:00
libtest-deep-perl \
libtest-fatal-perl \
libtest-mock-guard-perl \
libtest-mockobject-perl \
libtest-nowarnings-perl \
libtest-pod-perl \
2019-05-05 22:30:11 +02:00
libtest-requires-perl \
libtest-simple-perl \
2019-05-05 22:30:11 +02:00
libtest-warn-perl \
libtry-tiny-perl \
libunicode-string-perl \
liburi-perl \
2019-05-05 22:30:11 +02:00
libwww-perl \
lua-sql-mysql \
lua-socket \
2019-10-12 13:15:36 +02:00
mariadb-client \
2019-05-05 22:30:11 +02:00
procps \
2019-10-12 13:15:36 +02:00
python3-pip \
redis-server \
2019-05-05 22:30:11 +02:00
supervisor \
syslog-ng \
syslog-ng-core \
syslog-ng-mod-redis \
wget \
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true \
2019-07-28 21:34:42 +02:00
&& apt-key adv --fetch-keys https://repo.dovecot.org/DOVECOT-REPO-GPG \
🐄 Moorch Update 2022 - ClamAV, Dovecot & Olefy Update (#4497) * [API] Fix minor issue in api docs * [GH-Actions][stale] Add neverstale label to exempt list * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag error handling * [Web] add github version tag error handling * Passwordless SOGo auth: support for calendar invitations and calendar/contacts subscriptions Inviting someone to a calendar event triggers a request to /SOGo/so/otheruser@example.com/freebusy.ifb/ajaxRead. Subscribing to someone's calendar/contacts triggers a request to /SOGo/so/otheruser@example.com/foldersSearch. The email address in the URL is different from the logged-in user, which needs to be handled appropriately by sogo-auth.php. * [Web] add github version tag - adjust css * [Compose] Update SOGo Autoreply Schedule to 5m Based on the advice of inverse (SOGo developer). Thanks to https://github.com/jmber Closes: https://github.com/mailcow/mailcow-dockerized/issues/4436 * [Web] add github version tag - move twig globals * [Web] add github version tag - missing </div> * Passwordless SOGo auth: improvements for when accessing other users * [WebAuthn] fido2 passwordless auth - fix (#4440) * [WebAuthn] fido2 revert * [WebAuthn] set UV flags to 'discouraged' * [WebAuthn] revert - set UV flags to 'discouraged' * Update clamav to 0.104.2 * Update clamav to 0.104.2 * Update dovecot to 2.3.18 Update gosu to 1.14 Use debian bullseye as base * [Web] Updated lang.es.json [CI SKIP] (#4453) Co-authored-by: Fijxu <fijxu@zzls.xyz> Co-authored-by: milkmaker <milkmaker@mailcow.de> Co-authored-by: Fijxu <fijxu@zzls.xyz> * Fix broken documentation links (#4458) * Fix broken documentation links * Fix a few more broken documentation links * Fix broken documentation links in translation files * Fall back to empty string if WATCHDOG_NOTIFY_EMAIL undefined (#4457) By default, `.env` (`mailcow.conf`) does not define `WATCHDOG_NOTIFY_EMAIL`. Using it in `docker-compose.yml` without having it defined leads to Compose v2 displaying this warning on startup: > WARNING: The WATCHDOG_NOTIFY_EMAIL variable is not set. Defaulting to a blank string. Related to https://github.com/mailcow/mailcow-dockerized/issues/4315 * [Web] Updated lang.sk.json [CI SKIP] (#4461) Co-authored-by: Lukáš Matula <lukas@gbely.net> Co-authored-by: milkmaker <milkmaker@mailcow.de> Co-authored-by: Lukáš Matula <lukas@gbely.net> * oletools: disable template injection detection (#4464) Seems to be causing a lot of false positives lately * Fix minor typo in comment (#4466) Correction of the comment, so that the explanation is correct and can be understood. * Update issue templates to issue forms (#4465) This PR updates the issue templates to GitHubs new issue forms * [Web] Fix padding issue in UI admin panel (#4481) * [Web] fix admin panel padding issue * [Web] fix admin panel padding issue * [Web] Updated lang.sk.json [CI SKIP] (#4489) Co-authored-by: Lukáš Matula <lukas@gbely.net> Co-authored-by: milkmaker <milkmaker@mailcow.de> Co-authored-by: Lukáš Matula <lukas@gbely.net> * increase opcache.interned_strings_buffer to 16 (#4487) since version 23.0.2 Nextcloud recommends having a value greater than 8 for `opcache.interned_strings_buffer`. As this memory will be only used when needed this should have no impact on installations that are not using nextcloud. related discussion: https://help.nextcloud.com/t/nextcloud-23-02-opcache-interned-strings-buffer/134007/19 related nextcloud issue: https://github.com/nextcloud/server/issues/31223 * nextcloud - add missing redirections (#4366) adds missing location directives to the nginx configuration of nextcloud 22, to prevent warnings in nextcloud admin center of missing redirections * Update imapsync to 2.178 (#4491) * Update and fix oletools (#4479) As noticed by @MAGICCC (#4464 (comment)), our olefy image does not work anymore if you rebuild it. This is because @HeinleinSupport recently updated their repository with the changes from @decalage2's repository, which renamed olvba3 to olevba. Since @HeinleinSupport does not recommend using its own patched branch and is very slow in pulling in changes from upstream (@decalage2), let's switch to the latter. This also allowed me to revert #4464. Finally, a minor patch to rspamd is necessary. While the documentation says In the extended mode the oletools module will not trigger on specific categories, but will always set a threat string with all found flags when at least a macro was found. This is not actually true -- it only sets it when suspicious or autoexec threats were detected. But it's a one-line patch to make rspamd behave as documented and we should submit that patch to @rspamd too. With this patch, I have confirmed that Mailcow will reject any incoming, non-whitelisted message containing attachments with macros. * [Web] Fix excluded domain list in quaratine view Previously excluded domains from quarantine were not shown. * [Dovecot] Update syslogng Version to 3.28 (#4496) Co-authored-by: Niklas Meyer <niklas.meyer@tinc.gmbh> Co-authored-by: ntimo <git@nowitzki.me> Co-authored-by: Peter <magic@kthx.at> Co-authored-by: FreddleSpl0it <patschul@posteo.de> Co-authored-by: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Co-authored-by: Michael Kuron <mkuron@users.noreply.github.com> Co-authored-by: milkmaker <milkmaker@mailcow.de> Co-authored-by: Fijxu <fijxu@zzls.xyz> Co-authored-by: Slavi Pantaleev <slavi@devture.com> Co-authored-by: Lukáš Matula <lukas@gbely.net> Co-authored-by: Max <mail@heavygale.de> Co-authored-by: Michael Cramer <michael@bigmichi1.de> Co-authored-by: Robert Christian <soulsymphonies@users.noreply.github.com> Co-authored-by: André <andre.peters@debinux.de> Co-authored-by: Niklas Meyer <niklas.meyer@tinc.gmbh>
2022-03-02 17:32:17 +02:00
&& echo "deb https://repo.dovecot.org/ce-${DOVECOT}/debian/bullseye bullseye main" > /etc/apt/sources.list.d/dovecot.list \
2019-07-28 21:34:42 +02:00
&& apt-get update \
&& apt-get -y --no-install-recommends install \
dovecot-lua \
dovecot-managesieved \
dovecot-sieve \
dovecot-lmtpd \
dovecot-ldap \
dovecot-mysql \
dovecot-core \
dovecot-pop3d \
dovecot-imapd \
dovecot-solr \
2019-10-12 13:15:36 +02:00
&& pip3 install mysql-connector-python html2text jinja2 redis \
&& apt-get autoremove --purge -y \
2019-07-28 21:34:42 +02:00
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* /root/.cache/
# imapsync dependencies
RUN cpan Crypt::OpenSSL::PKCS12
COPY trim_logs.sh /usr/local/bin/trim_logs.sh
COPY clean_q_aged.sh /usr/local/bin/clean_q_aged.sh
2017-05-06 23:42:18 +02:00
COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf
2017-05-06 23:42:18 +02:00
COPY imapsync /usr/local/bin/imapsync
COPY imapsync_runner.pl /usr/local/bin/imapsync_runner.pl
2019-07-28 21:34:42 +02:00
COPY report-spam.sieve /usr/lib/dovecot/sieve/report-spam.sieve
COPY report-ham.sieve /usr/lib/dovecot/sieve/report-ham.sieve
COPY rspamd-pipe-ham /usr/lib/dovecot/sieve/rspamd-pipe-ham
COPY rspamd-pipe-spam /usr/lib/dovecot/sieve/rspamd-pipe-spam
COPY sa-rules.sh /usr/local/bin/sa-rules.sh
COPY maildir_gc.sh /usr/local/bin/maildir_gc.sh
2017-05-06 23:42:18 +02:00
COPY docker-entrypoint.sh /
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
COPY quarantine_notify.py /usr/local/bin/quarantine_notify.py
COPY quota_notify.py /usr/local/bin/quota_notify.py
COPY repl_health.sh /usr/local/bin/repl_health.sh
2017-05-06 23:42:18 +02:00
2017-03-02 12:23:23 +02:00
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf