mailcow/data/Dockerfiles/dovecot/Dockerfile

122 lines
3.6 KiB
Docker
Raw Normal View History

FROM debian:stretch-slim
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
2017-03-02 18:23:23 +08:00
ARG DEBIAN_FRONTEND=noninteractive
2017-03-02 18:23:23 +08:00
ENV LC_ALL C
2019-07-29 03:34:42 +08: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 \
&& 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 \
ca-certificates \
cpanminus \
2019-05-06 04:30:11 +08:00
cron \
curl \
dnsutils \
2019-07-29 03:34:42 +08:00
dirmngr \
gettext \
2019-07-29 03:34:42 +08:00
gnupg2 \
jq \
libauthen-ntlm-perl \
2019-05-06 04:30:11 +08:00
libcgi-pm-perl \
libcrypt-openssl-rsa-perl \
libcrypt-ssleay-perl \
2019-05-06 04:30:11 +08:00
libdata-uniqid-perl \
libdbd-mysql-perl \
libdbi-perl \
libdigest-hmac-perl \
2019-05-06 04:30:11 +08:00
libdist-checkconflicts-perl \
libfile-copy-recursive-perl \
2019-05-06 04:30:11 +08: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-06 04:30:11 +08:00
libjson-webtoken-perl \
liblockfile-simple-perl \
2019-05-06 04:30:11 +08:00
libmail-imapclient-perl \
libmodule-implementation-perl \
libmodule-scandeps-perl \
libnet-ssleay-perl \
2019-05-06 04:30:11 +08:00
libpackage-stash-perl \
libpackage-stash-xs-perl \
libpar-packer-perl \
2019-05-06 04:30:11 +08:00
libparse-recdescent-perl \
libproc-processtable-perl \
libreadonly-perl \
2019-05-06 04:30:11 +08:00
libregexp-common-perl \
libsys-meminfo-perl \
libterm-readkey-perl \
2019-05-06 04:30:11 +08:00
libtest-deep-perl \
libtest-fatal-perl \
libtest-mock-guard-perl \
libtest-mockobject-perl \
libtest-nowarnings-perl \
libtest-pod-perl \
2019-05-06 04:30:11 +08:00
libtest-requires-perl \
libtest-simple-perl \
2019-05-06 04:30:11 +08:00
libtest-warn-perl \
libtry-tiny-perl \
libunicode-string-perl \
liburi-perl \
2019-05-06 04:30:11 +08:00
libwww-perl \
mysql-client \
procps \
python3-html2text \
python3-jinja2 \
python3-mysql-connector \
python3-redis \
redis-server \
2019-05-06 04:30:11 +08:00
supervisor \
syslog-ng \
syslog-ng-core \
syslog-ng-mod-redis \
2019-07-29 03:34:42 +08:00
&& apt-key adv --fetch-keys https://repo.dovecot.org/DOVECOT-REPO-GPG \
&& echo 'deb https://repo.dovecot.org/ce-2.3-latest/debian/stretch stretch main' > /etc/apt/sources.list.d/dovecot.list \
&& 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 \
&& apt-get autoremove --purge -y \
2019-07-29 03:34:42 +08:00
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* \
2019-07-23 03:07:39 +08:00
&& rm -rf /tmp/* /var/tmp/* /etc/cron.daily/*
COPY trim_logs.sh /usr/local/bin/trim_logs.sh
COPY clean_q_aged.sh /usr/local/bin/clean_q_aged.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
2019-07-29 03:34:42 +08: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-07 05:42:18 +08: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
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