Fix the dovecot configuration path

master
kaiyou 6 years ago
parent 42c6bdb4df
commit 9890e1fb2a

@ -6,7 +6,6 @@ RUN apk add --no-cache \
&& pip3 install jinja2 podop && pip3 install jinja2 podop
COPY conf /conf COPY conf /conf
COPY sieve /var/lib/dovecot
COPY start.py /start.py COPY start.py /start.py
EXPOSE 110/tcp 143/tcp 993/tcp 4190/tcp 2525/tcp EXPOSE 110/tcp 143/tcp 993/tcp 4190/tcp 2525/tcp

@ -142,7 +142,7 @@ plugin {
sieve_global_extensions = +vnd.dovecot.execute sieve_global_extensions = +vnd.dovecot.execute
# Sieve execute # Sieve execute
sieve_execute_bin_dir = /etc/dovecot/bin sieve_execute_bin_dir = /conf/bin
# Send vacation replies even for aliases # Send vacation replies even for aliases
# See the Pigeonhole documentation about warnings: http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Vacation # See the Pigeonhole documentation about warnings: http://wiki2.dovecot.org/Pigeonhole/Sieve/Extensions/Vacation
@ -161,11 +161,11 @@ plugin {
# Learn from spam # Learn from spam
imapsieve_mailbox1_name = Junk imapsieve_mailbox1_name = Junk
imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_before = file:/etc/dovecot/report-spam.sieve imapsieve_mailbox1_before = file:/conf/report-spam.sieve
imapsieve_mailbox2_name = * imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Junk imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_before = file:/etc/dovecot/report-ham.sieve imapsieve_mailbox2_before = file:/conf/report-ham.sieve
} }
############### ###############

@ -22,7 +22,7 @@ convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()
# Actual startup script # Actual startup script
os.environ["FRONT_ADDRESS"] = socket.gethostbyname(os.environ.get("FRONT_ADDRESS", "front")) os.environ["FRONT_ADDRESS"] = socket.gethostbyname(os.environ.get("FRONT_ADDRESS", "front"))
for dovecot_file in glob.glob("/conf/*"): for dovecot_file in glob.glob("/conf/*.conf"):
convert(dovecot_file, os.path.join("/etc/dovecot", os.path.basename(dovecot_file))) convert(dovecot_file, os.path.join("/etc/dovecot", os.path.basename(dovecot_file)))
# Run Podop, then postfix # Run Podop, then postfix

Loading…
Cancel
Save