diff --git a/core/admin/Dockerfile b/core/admin/Dockerfile index 6916a16d..f6d28bf5 100644 --- a/core/admin/Dockerfile +++ b/core/admin/Dockerfile @@ -11,7 +11,7 @@ RUN mkdir static \ # Actual application -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ @@ -41,3 +41,4 @@ ENV FLASK_APP mailu CMD /start.py HEALTHCHECK CMD curl -f -L http://localhost/ui/login?next=ui.index || exit 1 + diff --git a/core/dovecot/Dockerfile b/core/dovecot/Dockerfile index 94432564..f9b0b026 100644 --- a/core/dovecot/Dockerfile +++ b/core/dovecot/Dockerfile @@ -1,14 +1,15 @@ -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ && pip3 install --upgrade pip -# Shared layer between rspamd, postfix, dovecot, unbound and nginx -RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart +# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx +RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart +# Shared layer between dovecot and postfix +RUN pip3 install "podop>0.2.5" # Image specific layers under this line RUN apk add --no-cache \ - dovecot dovecot-pigeonhole-plugin rspamd-client bash \ - && pip3 install podop \ + dovecot dovecot-lmtpd dovecot-pop3d dovecot-submissiond dovecot-pigeonhole-plugin rspamd-client \ && mkdir /var/lib/dovecot COPY conf /conf diff --git a/core/nginx/Dockerfile b/core/nginx/Dockerfile index 0156cccf..2ecd6db1 100644 --- a/core/nginx/Dockerfile +++ b/core/nginx/Dockerfile @@ -1,10 +1,10 @@ -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ && pip3 install --upgrade pip -# Shared layer between rspamd, postfix, dovecot, unbound and nginx -RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart +# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx +RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart # Image specific layers under this line RUN apk add --no-cache certbot nginx nginx-mod-mail openssl curl \ && pip3 install idna requests watchdog diff --git a/core/none/Dockerfile b/core/none/Dockerfile index f96ec394..96bf8411 100644 --- a/core/none/Dockerfile +++ b/core/none/Dockerfile @@ -1,5 +1,5 @@ # This is an idle image to dynamically replace any component if disabled. -FROM alpine:3.8 +FROM alpine:3.10 CMD sleep 1000000d diff --git a/core/postfix/Dockerfile b/core/postfix/Dockerfile index 3eff5218..3b5ba336 100644 --- a/core/postfix/Dockerfile +++ b/core/postfix/Dockerfile @@ -1,14 +1,15 @@ -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ && pip3 install --upgrade pip -# Shared layer between rspamd, postfix, dovecot, unbound and nginx -RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart +# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx +RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart +# Shared layer between dovecot and postfix +RUN pip3 install "podop>0.2.5" # Image specific layers under this line -RUN apk add --no-cache postfix postfix-pcre rsyslog \ - && pip3 install podop +RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-plain COPY conf /conf COPY start.py /start.py diff --git a/core/postfix/conf/main.cf b/core/postfix/conf/main.cf index d7e3dca8..18f8f5b8 100644 --- a/core/postfix/conf/main.cf +++ b/core/postfix/conf/main.cf @@ -2,6 +2,9 @@ # General ############### +# Logging configuration +maillog_file = /dev/stdout + # Main domain and hostname mydomain = {{ DOMAIN }} myhostname = {{ HOSTNAMES.split(",")[0] }} diff --git a/core/postfix/conf/master.cf b/core/postfix/conf/master.cf index 04df550c..b43095ee 100644 --- a/core/postfix/conf/master.cf +++ b/core/postfix/conf/master.cf @@ -33,3 +33,5 @@ discard unix - - n - - discard lmtp unix - - n - - lmtp anvil unix - - n - 1 anvil scache unix - - n - 1 scache +postlog unix-dgram n - n - 1 postlogd + diff --git a/core/postfix/conf/rsyslog.conf b/core/postfix/conf/rsyslog.conf deleted file mode 100644 index 13353b80..00000000 --- a/core/postfix/conf/rsyslog.conf +++ /dev/null @@ -1,4 +0,0 @@ -$ModLoad imuxsock -$template noTimestampFormat,"%syslogtag%%msg%\n" -$ActionFileDefaultTemplate noTimestampFormat -*.*;auth,authpriv.none /dev/stdout diff --git a/core/postfix/start.py b/core/postfix/start.py index 81849c5b..c1dd6301 100755 --- a/core/postfix/start.py +++ b/core/postfix/start.py @@ -53,12 +53,7 @@ if "RELAYUSER" in os.environ: convert("/conf/sasl_passwd", path) os.system("postmap {}".format(path)) -convert("/conf/rsyslog.conf", "/etc/rsyslog.conf") - # Run Podop and Postfix multiprocessing.Process(target=start_podop).start() -if os.path.exists("/var/run/rsyslogd.pid"): - os.remove("/var/run/rsyslogd.pid") -os.system("/usr/lib/postfix/post-install meta_directory=/etc/postfix create-missing") -os.system("/usr/lib/postfix/master &") -os.execv("/usr/sbin/rsyslogd", ["rsyslogd", "-n"]) +os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing") +os.system("postfix start-fg") diff --git a/optional/clamav/Dockerfile b/optional/clamav/Dockerfile index 27254544..02d0279a 100644 --- a/optional/clamav/Dockerfile +++ b/optional/clamav/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip bash \ diff --git a/optional/postgresql/Dockerfile b/optional/postgresql/Dockerfile index b03ff2d1..552aea48 100644 --- a/optional/postgresql/Dockerfile +++ b/optional/postgresql/Dockerfile @@ -1,9 +1,9 @@ -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip bash \ && pip3 install --upgrade pip -# Shared layer between rspamd, postfix, dovecot, unbound and nginx +# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx RUN pip3 install jinja2 # Image specific layers under this line RUN apk add --no-cache \ diff --git a/optional/radicale/Dockerfile b/optional/radicale/Dockerfile index de63daec..66c1d5ca 100644 --- a/optional/radicale/Dockerfile +++ b/optional/radicale/Dockerfile @@ -1,7 +1,7 @@ -FROM alpine:edge +FROM alpine:3.10 RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && apk add --no-cache radicale@testing py-dulwich@testing curl bash + && apk add --no-cache radicale@testing curl bash COPY radicale.conf /radicale.conf diff --git a/services/fetchmail/Dockerfile b/services/fetchmail/Dockerfile index 4004706d..d68bcb14 100644 --- a/services/fetchmail/Dockerfile +++ b/services/fetchmail/Dockerfile @@ -1,15 +1,16 @@ # First stage: Build -FROM alpine:3.8 as builder +FROM alpine:3.10 as builder # build dependencies RUN apk add --no-cache curl tar xz autoconf git gettext build-base openssl openssl-dev RUN curl -L 'https://sourceforge.net/projects/fetchmail/files/branch_7-alpha/fetchmail-7.0.0-alpha6.tar.xz/download' | tar xJ RUN cd fetchmail-7.0.0-alpha6 && \ + sed -i -e 's/SSLv3_client_method/SSLv23_client_method/' socket.c && \ ./configure --with-ssl --prefix /usr/local --disable-nls && \ make -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images diff --git a/services/rspamd/Dockerfile b/services/rspamd/Dockerfile index 70e6286d..c78de88f 100644 --- a/services/rspamd/Dockerfile +++ b/services/rspamd/Dockerfile @@ -1,10 +1,10 @@ -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ && pip3 install --upgrade pip -# Shared layer between rspamd, postfix, dovecot, unbound and nginx -RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart +# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx +RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart # Image specific layers under this line RUN apk add --no-cache rspamd rspamd-controller rspamd-proxy rspamd-fuzzy ca-certificates curl diff --git a/services/unbound/Dockerfile b/services/unbound/Dockerfile index 325584fd..ebfe0185 100644 --- a/services/unbound/Dockerfile +++ b/services/unbound/Dockerfile @@ -1,10 +1,10 @@ -FROM alpine:3.8 +FROM alpine:3.10 # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ && pip3 install --upgrade pip -# Shared layer between rspamd, postfix, dovecot, unbound and nginx -RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart +# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx +RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart # Image specific layers under this line RUN apk add --no-cache unbound curl bind-tools \ && curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache \ diff --git a/towncrier/newsfragments/1049.feature b/towncrier/newsfragments/1049.feature new file mode 100644 index 00000000..2f7a5a07 --- /dev/null +++ b/towncrier/newsfragments/1049.feature @@ -0,0 +1 @@ +Don’t use complicated rsyslogd logging in postfix anymore, instead start the daemon directly — configured to log to stdout. diff --git a/towncrier/newsfragments/1051.feature b/towncrier/newsfragments/1051.feature new file mode 100644 index 00000000..812bef2f --- /dev/null +++ b/towncrier/newsfragments/1051.feature @@ -0,0 +1 @@ +Update alpine to 3.10 and clean up the ensuing problems. diff --git a/webmails/rainloop/Dockerfile b/webmails/rainloop/Dockerfile index 728664f2..94d8eff5 100644 --- a/webmails/rainloop/Dockerfile +++ b/webmails/rainloop/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2-apache +FROM php:7.3-apache #Shared layer between rainloop and roundcube RUN apt-get update && apt-get install -y \ python3 curl python3-pip git \ @@ -22,7 +22,8 @@ RUN apt-get update && apt-get install -y \ && apt-get purge -y unzip \ && rm -rf /var/lib/apt/lists - RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart +# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx +RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart COPY include.php /var/www/html/include.php COPY php.ini /php.ini diff --git a/webmails/roundcube/Dockerfile b/webmails/roundcube/Dockerfile index 3c970ea4..2db49967 100644 --- a/webmails/roundcube/Dockerfile +++ b/webmails/roundcube/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2-apache +FROM php:7.3-apache #Shared layer between rainloop and roundcube RUN apt-get update && apt-get install -y \ python3 curl python3-pip git \ @@ -8,7 +8,8 @@ RUN apt-get update && apt-get install -y \ ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.3.9/roundcubemail-1.3.9-complete.tar.gz RUN apt-get update && apt-get install -y \ - zlib1g-dev python3-jinja2 \ + zlib1g-dev libzip4 libzip-dev \ + python3-jinja2 \ && docker-php-ext-install zip \ && echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \ && rm -rf /var/www/html/ \ @@ -23,7 +24,8 @@ RUN apt-get update && apt-get install -y \ && chown -R www-data: logs temp \ && rm -rf /var/lib/apt/lists - RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart +# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx +RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart COPY php.ini /php.ini COPY config.inc.php /var/www/html/config/