2019-10-12 13:15:36 +02:00
|
|
|
FROM debian:buster-slim
|
2017-05-13 15:33:32 +02:00
|
|
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
2017-03-02 11:23:23 +01:00
|
|
|
|
2017-05-13 16:29:18 +02:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2021-09-01 17:00:51 +02:00
|
|
|
ARG DOVECOT=2.3.16
|
2017-03-02 11:23:23 +01:00
|
|
|
ENV LC_ALL C
|
2021-04-16 20:38:09 +02:00
|
|
|
ENV GOSU_VERSION 1.12
|
2018-01-14 10:44:06 +01:00
|
|
|
|
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 \
|
2020-11-06 12:23:02 +01:00
|
|
|
&& 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 \
|
|
|
|
apt-transport-https \
|
2018-01-14 10:44:06 +01:00
|
|
|
ca-certificates \
|
|
|
|
cpanminus \
|
|
|
|
curl \
|
[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)
[Docker API] Create pipe to pass Rspamd UI worker password
[Dovecot] Pull Spamassassin ruleset to be read by Rspamd (MANY THANKS to Peer Heinlein!)
[Dovecot] Garbage collector for deleted maildirs (set keep time via MAILDIR_GC_TIME which defaults to 1440 minutes)
[Web] Flush memcached after mailbox item changes, fixes #1808
[Web] Fix duplicate IDs, fixes #1792
[Compose] Use SQL sockets
[PHP-FPM] Update APCu and Redis libs
[Dovecot] Encrypt maildir with global key pair in crypt-vol-1 (BACKUP!), also fixes #1791
[Web] Fix deletion of spam aliases
[Helper] Add "crypt" to backup script
[Helper] Override file for external SQL socket (not supported!)
[Compose] New images for Rspamd, PHP-FPM, SOGo, Dovecot, Docker API, Watchdog, ACME, Postfix
2018-09-29 22:01:23 +02:00
|
|
|
dnsutils \
|
2019-07-28 21:34:42 +02:00
|
|
|
dirmngr \
|
2018-11-26 09:11:22 +01:00
|
|
|
gettext \
|
2019-07-28 21:34:42 +02:00
|
|
|
gnupg2 \
|
2018-11-12 09:49:23 +01:00
|
|
|
jq \
|
2018-01-14 10:44:06 +01:00
|
|
|
libauthen-ntlm-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libcgi-pm-perl \
|
|
|
|
libcrypt-openssl-rsa-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
libcrypt-ssleay-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libdata-uniqid-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
libdbd-mysql-perl \
|
|
|
|
libdbi-perl \
|
|
|
|
libdigest-hmac-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libdist-checkconflicts-perl \
|
2020-01-06 23:13:37 +01:00
|
|
|
libencode-imaputf7-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
libfile-copy-recursive-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libfile-tail-perl \
|
|
|
|
libhtml-parser-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
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 \
|
2018-01-14 10:44:06 +01:00
|
|
|
liblockfile-simple-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libmail-imapclient-perl \
|
|
|
|
libmodule-implementation-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
libmodule-scandeps-perl \
|
|
|
|
libnet-ssleay-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libpackage-stash-perl \
|
|
|
|
libpackage-stash-xs-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
libpar-packer-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libparse-recdescent-perl \
|
|
|
|
libproc-processtable-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
libreadonly-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libregexp-common-perl \
|
|
|
|
libsys-meminfo-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
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 \
|
2018-01-14 10:44:06 +01:00
|
|
|
libtest-pod-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libtest-requires-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
libtest-simple-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libtest-warn-perl \
|
2018-07-27 22:19:14 +02:00
|
|
|
libtry-tiny-perl \
|
2018-01-14 10:44:06 +01:00
|
|
|
libunicode-string-perl \
|
|
|
|
liburi-perl \
|
2019-05-05 22:30:11 +02:00
|
|
|
libwww-perl \
|
2019-12-03 18:50:45 +01:00
|
|
|
lua-sql-mysql \
|
2021-06-04 14:27:33 +02:00
|
|
|
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 \
|
2018-08-02 12:14:13 +02:00
|
|
|
redis-server \
|
2019-05-05 22:30:11 +02:00
|
|
|
supervisor \
|
2018-01-14 10:44:06 +01:00
|
|
|
syslog-ng \
|
|
|
|
syslog-ng-core \
|
|
|
|
syslog-ng-mod-redis \
|
2021-04-16 20:38:09 +02:00
|
|
|
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 \
|
2020-06-07 22:50:24 +02:00
|
|
|
&& echo "deb https://repo.dovecot.org/ce-${DOVECOT}/debian/buster buster 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 \
|
2019-01-29 00:11:12 +01:00
|
|
|
&& apt-get autoremove --purge -y \
|
2019-07-28 21:34:42 +02:00
|
|
|
&& apt-get autoclean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2021-04-16 20:38:09 +02:00
|
|
|
&& rm -rf /tmp/* /var/tmp/* /root/.cache/
|
2017-04-03 20:06:49 +02:00
|
|
|
|
2018-08-02 12:14:13 +02:00
|
|
|
COPY trim_logs.sh /usr/local/bin/trim_logs.sh
|
2019-06-01 21:23:43 +02:00
|
|
|
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
|
2020-02-05 10:56:44 +01:00
|
|
|
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
|
2021-04-16 20:38:09 +02:00
|
|
|
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
|
[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)
[Docker API] Create pipe to pass Rspamd UI worker password
[Dovecot] Pull Spamassassin ruleset to be read by Rspamd (MANY THANKS to Peer Heinlein!)
[Dovecot] Garbage collector for deleted maildirs (set keep time via MAILDIR_GC_TIME which defaults to 1440 minutes)
[Web] Flush memcached after mailbox item changes, fixes #1808
[Web] Fix duplicate IDs, fixes #1792
[Compose] Use SQL sockets
[PHP-FPM] Update APCu and Redis libs
[Dovecot] Encrypt maildir with global key pair in crypt-vol-1 (BACKUP!), also fixes #1791
[Web] Fix deletion of spam aliases
[Helper] Add "crypt" to backup script
[Helper] Override file for external SQL socket (not supported!)
[Compose] New images for Rspamd, PHP-FPM, SOGo, Dovecot, Docker API, Watchdog, ACME, Postfix
2018-09-29 22:01:23 +02:00
|
|
|
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
|
2018-10-25 22:35:07 +02:00
|
|
|
COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
|
2019-01-29 00:11:12 +01:00
|
|
|
COPY quarantine_notify.py /usr/local/bin/quarantine_notify.py
|
2019-02-05 00:00:22 +01:00
|
|
|
COPY quota_notify.py /usr/local/bin/quota_notify.py
|
2020-04-14 12:48:57 +02:00
|
|
|
COPY repl_health.sh /usr/local/bin/repl_health.sh
|
2017-05-06 23:42:18 +02:00
|
|
|
|
2017-03-02 11:23:23 +01:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|