From 13b9a9207d2453ca698ec3e7bb7252803df5e350 Mon Sep 17 00:00:00 2001 From: kaiyou Date: Sun, 24 Sep 2017 14:42:40 +0200 Subject: [PATCH] Switch to python and Jinja2 for the dovecot container --- dovecot/Dockerfile | 10 ++++----- dovecot/conf/dovecot-sql.conf.ext | 2 +- dovecot/conf/dovecot.conf | 35 ++++++------------------------- dovecot/start.py | 20 ++++++++++++++++++ dovecot/start.sh | 13 ------------ 5 files changed, 31 insertions(+), 49 deletions(-) create mode 100755 dovecot/start.py delete mode 100755 dovecot/start.sh diff --git a/dovecot/Dockerfile b/dovecot/Dockerfile index ee80fe42..9e87f12f 100644 --- a/dovecot/Dockerfile +++ b/dovecot/Dockerfile @@ -3,12 +3,10 @@ FROM alpine:edge RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ && apk add --no-cache \ dovecot dovecot-sqlite dovecot-pigeonhole-plugin dovecot-pigeonhole-plugin-extdata \ - rspamd-client@testing \ - bash + rspamd-client@testing python py-jinja2 -COPY conf /etc/dovecot +COPY conf /conf COPY sieve /var/lib/dovecot +COPY start.py /start.py -COPY start.sh /start.sh - -CMD ["/start.sh"] +CMD /start.py diff --git a/dovecot/conf/dovecot-sql.conf.ext b/dovecot/conf/dovecot-sql.conf.ext index e42abb84..d2e31016 100644 --- a/dovecot/conf/dovecot-sql.conf.ext +++ b/dovecot/conf/dovecot-sql.conf.ext @@ -3,7 +3,7 @@ connect = /data/main.db # Return the user hashed password password_query = \ - SELECT password \ + SELECT NULL as password, 'Y' as nopassword, '{{ FRONT_ADDRESS }}' as allow_nets \ FROM user \ WHERE user.email = '%u' diff --git a/dovecot/conf/dovecot.conf b/dovecot/conf/dovecot.conf index faa41bf7..a1ec72fd 100644 --- a/dovecot/conf/dovecot.conf +++ b/dovecot/conf/dovecot.conf @@ -52,27 +52,11 @@ namespace inbox { } } -############### -# TLS -############### -ssl = yes -ssl_cert =