diff --git a/Dockerfile b/Dockerfile index efdf2780..3e0cfd6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,13 +28,6 @@ RUN apt-get update -q --fix-missing && \ clamav-daemon \ cpio \ curl \ - dovecot-core \ - dovecot-imapd \ - dovecot-ldap \ - dovecot-lmtpd \ - dovecot-managesieved \ - dovecot-pop3d \ - dovecot-sieve \ ed \ fail2ban \ fetchmail \ @@ -77,11 +70,20 @@ RUN apt-get update -q --fix-missing && \ && \ curl https://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add - && \ echo "deb http://packages.elastic.co/beats/apt stable main" | tee -a /etc/apt/sources.list.d/beats.list && \ + echo "deb http://ftp.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list.d/stretch-bp.list && \ apt-get update -q --fix-missing && \ apt-get -y upgrade \ - fail2ban \ filebeat \ && \ + apt-get -t stretch-backports -y install --no-install-recommends \ + dovecot-core \ + dovecot-imapd \ + dovecot-ldap \ + dovecot-lmtpd \ + dovecot-managesieved \ + dovecot-pop3d \ + dovecot-sieve \ + && \ apt-get autoclean && \ rm -rf /var/lib/apt/lists/* && \ rm -rf /usr/share/locale/* && \ @@ -107,6 +109,9 @@ RUN sed -i -e 's/include_try \/usr\/share\/dovecot\/protocols\.d/include_try \/e sed -i -e 's/^.*lda_mailbox_autosubscribe.*/lda_mailbox_autosubscribe = yes/g' /etc/dovecot/conf.d/15-lda.conf && \ sed -i -e 's/^.*postmaster_address.*/postmaster_address = '${POSTMASTER_ADDRESS:="postmaster@domain.com"}'/g' /etc/dovecot/conf.d/15-lda.conf && \ sed -i 's/#imap_idle_notify_interval = 2 mins/imap_idle_notify_interval = 29 mins/' /etc/dovecot/conf.d/20-imap.conf && \ + # stretch-backport of dovecot needs this folder + mkdir /etc/dovecot/ssl && \ + chmod 755 /etc/dovecot/ssl && \ cd /usr/share/dovecot && \ ./mkcert.sh && \ mkdir /usr/lib/dovecot/sieve-pipe && \ diff --git a/target/dovecot/10-ssl.conf b/target/dovecot/10-ssl.conf index 4623d60c..2d6fd178 100644 --- a/target/dovecot/10-ssl.conf +++ b/target/dovecot/10-ssl.conf @@ -9,8 +9,8 @@ # dropping root privileges, so keep the key file unreadable by anyone but # root. Included doc/mkcert.sh can be used to easily generate self-signed # certificate, just make sure to update the domains in dovecot-openssl.cnf -ssl_cert =