Fix password_file not existing in dovecot pods

authorize plaintext
fix password file
Added a startup.sh file
This commit is contained in:
Quentin Legot 2023-10-11 15:08:26 +02:00
parent f363a5cdb4
commit d9cb537a61
4 changed files with 12 additions and 4 deletions

View File

@ -8,11 +8,13 @@ RUN apk --no-cache add dovecot dovecot-lmtpd dovecot-submissiond bash
# RUN wget https://github.com/dovecot/docker/blob/main/2.3.21/dovecot.list # RUN wget https://github.com/dovecot/docker/blob/main/2.3.21/dovecot.list
# RUN cp dovecot.list /etc/apt/sources.list.d # RUN cp dovecot.list /etc/apt/sources.list.d
COPY password_file /etc/dovecot/secrets/dovecot_password_file COPY password_file /etc/dovecot/dovecot_password_file
COPY dovecot.conf /etc/dovecot/dovecot.conf COPY dovecot.conf /etc/dovecot/dovecot.conf
COPY startup.sh /usr/bin/startup.sh
RUN chmod +x /usr/bin/startup.sh
EXPOSE 24 EXPOSE 24
EXPOSE 143 EXPOSE 143
EXPOSE 993 EXPOSE 993
CMD [ "dovecot", "-F" ] CMD [ "startup.sh" ]

View File

@ -25,6 +25,7 @@ userdb {
} }
ssl=no ssl=no
disable_plaintext_auth=no
# ssl_cert=<cert.pem # ssl_cert=<cert.pem
# ssl_key=<key.pem # ssl_key=<key.pem

View File

@ -1,2 +1,2 @@
user:{PLAIN}password user:{PLAIN}password:::
user2:{PLAIN}password2 user2:{PLAIN}password2:::

View File

@ -0,0 +1,5 @@
#!/bin/bash
cp -n /etc/dovecot/dovecot_password_file /etc/dovecot/secrets/dovecot_password_file
exec dovecot -F