2017-04-04 02:06:49 +08:00
|
|
|
FROM debian:stretch-slim
|
2017-05-13 21:33:32 +08:00
|
|
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
2017-03-02 18:23:23 +08:00
|
|
|
|
2017-05-13 22:29:18 +08:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2017-03-02 18:23:23 +08:00
|
|
|
ENV LC_ALL C
|
2019-04-01 01:07:39 +08:00
|
|
|
ENV DOVECOT_VERSION 2.3.5.1
|
2019-03-10 16:35:26 +08:00
|
|
|
ENV PIGEONHOLE_VERSION 0.5.5
|
2018-01-14 17:44:06 +08:00
|
|
|
|
2018-01-09 05:00:54 +08:00
|
|
|
RUN apt-get update && apt-get -y --no-install-recommends install \
|
2018-01-14 17:44:06 +08:00
|
|
|
automake \
|
|
|
|
autotools-dev \
|
|
|
|
build-essential \
|
|
|
|
ca-certificates \
|
|
|
|
cpanminus \
|
|
|
|
curl \
|
|
|
|
default-libmysqlclient-dev \
|
[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-30 04:01:23 +08:00
|
|
|
dnsutils \
|
2018-11-26 16:11:22 +08:00
|
|
|
gettext \
|
2018-11-12 16:49:23 +08:00
|
|
|
jq \
|
2017-12-18 00:45:05 +08:00
|
|
|
libjson-webtoken-perl \
|
|
|
|
libcgi-pm-perl \
|
|
|
|
libcrypt-openssl-rsa-perl \
|
|
|
|
libdata-uniqid-perl \
|
|
|
|
libhtml-parser-perl \
|
|
|
|
libmail-imapclient-perl \
|
|
|
|
libparse-recdescent-perl \
|
|
|
|
libsys-meminfo-perl \
|
|
|
|
libtest-mockobject-perl \
|
|
|
|
libwww-perl \
|
2018-01-14 17:44:06 +08:00
|
|
|
libauthen-ntlm-perl \
|
|
|
|
libbz2-dev \
|
|
|
|
libcrypt-ssleay-perl \
|
2018-04-26 18:36:13 +08:00
|
|
|
libcurl4-openssl-dev \
|
2018-01-14 17:44:06 +08:00
|
|
|
libdbd-mysql-perl \
|
|
|
|
libdbi-perl \
|
|
|
|
libdigest-hmac-perl \
|
2018-04-26 18:36:13 +08:00
|
|
|
libexpat1-dev \
|
2018-01-14 17:44:06 +08:00
|
|
|
libfile-copy-recursive-perl \
|
|
|
|
libio-compress-perl \
|
|
|
|
libio-socket-inet6-perl \
|
|
|
|
libio-socket-ssl-perl \
|
|
|
|
libio-tee-perl \
|
|
|
|
libipc-run-perl \
|
2018-11-26 16:11:22 +08:00
|
|
|
libldap2-dev \
|
2018-01-14 17:44:06 +08:00
|
|
|
liblockfile-simple-perl \
|
|
|
|
liblz-dev \
|
|
|
|
liblz4-dev \
|
|
|
|
liblzma-dev \
|
|
|
|
libmodule-scandeps-perl \
|
|
|
|
libnet-ssleay-perl \
|
|
|
|
libpam-dev \
|
|
|
|
libpar-packer-perl \
|
|
|
|
libreadonly-perl \
|
|
|
|
libssl-dev \
|
|
|
|
libterm-readkey-perl \
|
|
|
|
libtest-pod-perl \
|
|
|
|
libtest-simple-perl \
|
2018-07-28 04:19:14 +08:00
|
|
|
libtry-tiny-perl \
|
2018-01-14 17:44:06 +08:00
|
|
|
libunicode-string-perl \
|
2017-11-04 03:25:38 +08:00
|
|
|
libproc-processtable-perl \
|
2018-08-02 18:14:13 +08:00
|
|
|
libtest-nowarnings-perl \
|
|
|
|
libtest-deep-perl \
|
|
|
|
libtest-warn-perl \
|
|
|
|
libregexp-common-perl \
|
2018-01-14 17:44:06 +08:00
|
|
|
liburi-perl \
|
|
|
|
lzma-dev \
|
2019-02-05 17:38:28 +08:00
|
|
|
python-html2text \
|
2019-01-29 07:11:12 +08:00
|
|
|
python-jinja2 \
|
|
|
|
python-mysql.connector \
|
2019-02-05 17:38:28 +08:00
|
|
|
python-redis \
|
2018-01-14 17:44:06 +08:00
|
|
|
make \
|
2018-06-04 01:22:44 +08:00
|
|
|
mysql-client \
|
2017-11-04 03:25:38 +08:00
|
|
|
procps \
|
2018-01-14 17:44:06 +08:00
|
|
|
supervisor \
|
2018-01-09 05:00:54 +08:00
|
|
|
cron \
|
2018-08-02 18:14:13 +08:00
|
|
|
redis-server \
|
2018-01-14 17:44:06 +08:00
|
|
|
syslog-ng \
|
|
|
|
syslog-ng-core \
|
|
|
|
syslog-ng-mod-redis \
|
2019-01-29 07:11:12 +08:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& curl https://www.dovecot.org/releases/2.3/dovecot-$DOVECOT_VERSION.tar.gz | tar xvz \
|
2018-01-14 17:44:06 +08:00
|
|
|
&& cd dovecot-$DOVECOT_VERSION \
|
2018-11-26 16:11:22 +08:00
|
|
|
&& ./configure --with-solr --with-mysql --with-ldap --with-lzma --with-lz4 --with-ssl=openssl --with-notify=inotify --with-storages=mdbox,sdbox,maildir,mbox,imapc,pop3c --with-bzlib --with-zlib --enable-hardening \
|
2018-01-14 17:44:06 +08:00
|
|
|
&& make -j3 \
|
|
|
|
&& make install \
|
|
|
|
&& make clean \
|
|
|
|
&& cd .. && rm -rf dovecot-$DOVECOT_VERSION \
|
2018-04-26 18:36:13 +08:00
|
|
|
&& curl https://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-$PIGEONHOLE_VERSION.tar.gz | tar xvz \
|
|
|
|
&& cd dovecot-2.3-pigeonhole-$PIGEONHOLE_VERSION \
|
2018-01-14 17:44:06 +08:00
|
|
|
&& ./configure \
|
|
|
|
&& make -j3 \
|
|
|
|
&& make install \
|
|
|
|
&& make clean \
|
|
|
|
&& cd .. \
|
2019-01-29 07:11:12 +08:00
|
|
|
&& rm -rf dovecot-2.3-pigeonhole-$PIGEONHOLE_VERSION \
|
|
|
|
&& cpanm Data::Uniqid Mail::IMAPClient String::Util \
|
|
|
|
&& groupadd -g 5000 vmail \
|
|
|
|
&& groupadd -g 401 dovecot \
|
|
|
|
&& groupadd -g 402 dovenull \
|
|
|
|
&& 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 purge -y build-essential automake autotools-dev default-libmysqlclient-dev libbz2-dev libcurl4-openssl-dev libexpat1-dev liblz-dev liblz4-dev liblzma-dev libpam-dev libssl-dev lzma-dev \
|
|
|
|
&& apt-get autoremove --purge -y \
|
|
|
|
&& rm -rf /tmp/* /var/tmp/*
|
2017-04-04 02:06:49 +08:00
|
|
|
|
2018-08-02 18:14:13 +08:00
|
|
|
COPY trim_logs.sh /usr/local/bin/trim_logs.sh
|
2017-05-07 05:42:18 +08:00
|
|
|
COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
|
|
|
|
COPY imapsync /usr/local/bin/imapsync
|
|
|
|
COPY postlogin.sh /usr/local/bin/postlogin.sh
|
|
|
|
COPY imapsync_cron.pl /usr/local/bin/imapsync_cron.pl
|
|
|
|
COPY report-spam.sieve /usr/local/lib/dovecot/sieve/report-spam.sieve
|
|
|
|
COPY report-ham.sieve /usr/local/lib/dovecot/sieve/report-ham.sieve
|
|
|
|
COPY rspamd-pipe-ham /usr/local/lib/dovecot/sieve/rspamd-pipe-ham
|
|
|
|
COPY rspamd-pipe-spam /usr/local/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-30 04:01:23 +08:00
|
|
|
COPY sa-rules.sh /usr/local/bin/sa-rules.sh
|
|
|
|
COPY maildir_gc.sh /usr/local/bin/maildir_gc.sh
|
2017-05-07 05:42:18 +08:00
|
|
|
COPY docker-entrypoint.sh /
|
|
|
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
2018-10-26 04:35:07 +08:00
|
|
|
COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
|
2019-01-29 07:11:12 +08:00
|
|
|
COPY quarantine_notify.py /usr/local/bin/quarantine_notify.py
|
2019-02-05 07:00:22 +08:00
|
|
|
COPY quota_notify.py /usr/local/bin/quota_notify.py
|
2017-05-07 05:42:18 +08:00
|
|
|
|
2017-03-02 18:23:23 +08:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|