diff --git a/dockerfiles/dovecot/Dockerfile b/dockerfiles/dovecot/Dockerfile new file mode 100644 index 0000000..2141e52 --- /dev/null +++ b/dockerfiles/dovecot/Dockerfile @@ -0,0 +1,18 @@ +FROM alpine:latest + +RUN apk --no-cache add dovecot dovecot-lmtpd dovecot-submissiond bash + +# RUN wget https://github.com/dovecot/docker/blob/main/2.3.21/dovecot.gpg +# RUN cp dovecot.gpg /etc/apt/keyrings/dovecot.gpg + +# RUN wget https://github.com/dovecot/docker/blob/main/2.3.21/dovecot.list +# RUN cp dovecot.list /etc/apt/sources.list.d + +COPY password_file /etc/dovecot/secrets/dovecot_password.file +COPY dovecot.conf /etc/dovecot/dovecot.conf + +EXPOSE 24 +EXPOSE 143 +EXPOSE 993 + +CMD [ "dovecot", "-F" ] \ No newline at end of file diff --git a/dockerfiles/dovecot/dovecot.conf b/dockerfiles/dovecot/dovecot.conf new file mode 100644 index 0000000..ef59f46 --- /dev/null +++ b/dockerfiles/dovecot/dovecot.conf @@ -0,0 +1,48 @@ +## You should mount /etc/dovecot if you want to +## manage this file + +mail_home=/srv/mail/%Lu +mail_location=sdbox:~/Mail +mail_uid=1000 +mail_gid=10000 + +protocols = imap submission lmtp + +first_valid_uid = 1000 +last_valid_uid = 10000 + +# authentication via passwd-file, see https://doc.dovecot.org/configuration_manual/authentication/passwd_file/#authentication-passwd-file +passdb { + driver = passwd-file + args = /etc/dovecot/secrets/dovecot_password_file +} + +# post-login user lookup database, see https://doc.dovecot.org/configuration_manual/authentication/user_databases_userdb/#authentication-user-database +userdb { + driver = passwd-file + args = /etc/dovecot/secrets/dovecot_password_file + default_fields = home=/home/%u +} + +ssl=no +# ssl_cert=