mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 10:05:00 +02:00
Update readme
reorg dockerfile and add comments
This commit is contained in:
parent
697baed324
commit
043e184630
2 changed files with 25 additions and 22 deletions
16
Dockerfile
16
Dockerfile
|
@ -17,8 +17,8 @@ ENV SASLAUTHD_MECH_OPTIONS=""
|
|||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Packages
|
||||
# hadolint ignore=DL3015,SC2016
|
||||
RUN echo "deb http://ftp.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list.d/stretch-bp.list && \
|
||||
# hadolint ignore=DL3015
|
||||
RUN echo "deb http://http.debian.net/debian stretch-backports main" | tee -a /etc/apt/sources.list.d/stretch-bp.list && \
|
||||
apt-get update -q --fix-missing && \
|
||||
apt-get -y install postfix && \
|
||||
# TODO installing postfix with --no-install-recommends makes "checking ssl: generated default cert works correctly" fail
|
||||
|
@ -77,9 +77,10 @@ RUN echo "deb http://ftp.debian.org/debian stretch-backports main" | tee -a /etc
|
|||
xz-utils \
|
||||
zoo \
|
||||
&& \
|
||||
# use Dovecot community repo to react faster on security updates
|
||||
curl https://repo.dovecot.org/DOVECOT-REPO-GPG | gpg --import && \
|
||||
gpg --export ED409DA1 > /etc/apt/trusted.gpg.d/dovecot.gpg && \
|
||||
echo "deb https://repo.dovecot.org/ce-2.3-latest/debian/stretch stretch main" > /etc/apt/sources.list.d/dovecot.list && \
|
||||
echo "deb https://repo.dovecot.org/ce-2.3-latest/debian/stretch stretch main" > /etc/apt/sources.list.d/dovecot-community.list && \
|
||||
apt-get update -q --fix-missing && \
|
||||
apt-get -y install --no-install-recommends \
|
||||
dovecot-core \
|
||||
|
@ -90,9 +91,6 @@ RUN echo "deb http://ftp.debian.org/debian stretch-backports main" | tee -a /etc
|
|||
dovecot-pop3d \
|
||||
dovecot-sieve \
|
||||
&& \
|
||||
sed -i 's/CERTDIR=.*/CERTDIR=\/etc\/dovecot\/ssl/g' /usr/share/dovecot/mkcert.sh && \
|
||||
sed -i 's/KEYDIR=.*/KEYDIR=\/etc\/dovecot\/ssl/g' /usr/share/dovecot/mkcert.sh && \
|
||||
sed -i 's/KEYFILE=.*/KEYFILE=\$KEYDIR\/dovecot.key/g' /usr/share/dovecot/mkcert.sh && \
|
||||
apt-get autoclean && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /usr/share/locale/* && \
|
||||
|
@ -132,7 +130,11 @@ 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
|
||||
# Adapt mkcert for Dovecot community repo
|
||||
sed -i 's/CERTDIR=.*/CERTDIR=\/etc\/dovecot\/ssl/g' /usr/share/dovecot/mkcert.sh && \
|
||||
sed -i 's/KEYDIR=.*/KEYDIR=\/etc\/dovecot\/ssl/g' /usr/share/dovecot/mkcert.sh && \
|
||||
sed -i 's/KEYFILE=.*/KEYFILE=\$KEYDIR\/dovecot.key/g' /usr/share/dovecot/mkcert.sh && \
|
||||
# create directory for certificates created by mkcert
|
||||
mkdir /etc/dovecot/ssl && \
|
||||
chmod 755 /etc/dovecot/ssl && \
|
||||
./mkcert.sh && \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue