Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions githubactions-dovecot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ RUN \
COPY ./files/etc/dovecot/local.conf /etc/dovecot/local.conf
COPY ./files/etc/dovecot/passwd /etc/dovecot/passwd

# Debian's default config puts a PAM passdb in front of our passwd-file one.
# Test users are not system users, so PAM always fails, which add a 2 seconds delay
# before Dovecot falls back to passwd-file.
# Disable it and fail the build if PAM is still configured (e.g. if Debian changes this line).
RUN \
sed -i 's/^!include auth-system.conf.ext/#&/' /etc/dovecot/conf.d/10-auth.conf \
\
# Check the resulting config.
&& doveconf -n > /tmp/doveconf.txt \
&& ! grep -qw pam /tmp/doveconf.txt \
&& rm /tmp/doveconf.txt

HEALTHCHECK --interval=10s --retries=5 --timeout=5s --start-period=30s --start-interval=1s \
CMD doveadm service status

Expand Down
3 changes: 3 additions & 0 deletions githubactions-dovecot/files/etc/dovecot/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ mail_path = /home/glpi/Maildir
mail_inbox_path = /home/glpi/Maildir
mail_max_userip_connections = 10000

# Do not slow down failed logins, tests use wrong credentials on purpose.
auth_failure_delay = 0

passdb passwd-file {
passwd_file_path = /etc/dovecot/passwd
}
Expand Down
4 changes: 4 additions & 0 deletions githubactions-dovecot/files/etc/dovecot/passwd
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
testuser:{plain}applesauce:1000:1000::/home/glpi::
# Some fixtures scripts are included with `doveadm -u glpi`.
# Since we disabled the PAM passdb we now need a dedicated user here so these
# scripts do not break.
glpi:{plain}glpi:1000:1000::/home/glpi::
Loading