1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-03 17:17:29 +00:00
Files
go-chasquid-smtp/test/t-11-dovecot/config/dovecot.conf.in
Alberto Bertogli 910c6e9cc9 test: Add workarounds for dovecot 2.3
The current dovecot config for integration test t-11-dovecot is not
compatible with dovecot 2.3. There are some new services which want to
change the group owner for some files to the default, and that does not
work when run as non-root.

The errors look like:

  master: Error: service(stats): chown(/tmp/chasquid-dovecot-test/run/stats-writer, 4294967295, 127) failed: Operation not permitted
  master: Error: service(imap-hibernate): chown(/tmp/chasquid-dovecot-test/run/imap-hibernate, 4294967295, 127) failed: Operation not permitted
  master: Error: service(dict): chown(/tmp/chasquid-dovecot-test/run/dict, 4294967295, 127) failed: Operation not permitted
  master: Error: service(dict-async): chown(/tmp/chasquid-dovecot-test/run/dict-async, 4294967295, 127) failed: Operation not permitted
  master: Fatal: Failed to start listeners

(127 is the "dovecot" user)

So this patch adds some config settings to set the group manually for
these services, which is backwards compatible with 2.2.

Eventually we will stop supporting 2.2 for tests, at which point we can
change to just setting default_internal_group.
2018-07-15 13:15:10 +01:00

79 lines
1.5 KiB
Plaintext

base_dir = $ROOT/run/
log_path = $ROOT/dovecot.log
ssl = no
default_internal_user = $USER
default_login_user = $USER
# Before auth checks, rename "u@d" to "u-AT-d". This exercises that chasquid
# handles well the case where the returned user information does not match the
# requested user.
auth_username_format = "%n-AT-%d"
passdb {
driver = passwd-file
args = $ROOT/passwd
}
userdb {
driver = passwd-file
args = $ROOT/passwd
}
service auth {
unix_listener auth {
mode = 0666
}
}
# Dovecot refuses to start without protocols, so we need to give it one.
protocols = imap
service imap-login {
chroot =
inet_listener imap {
address = 127.0.0.1
port = 0
}
}
service anvil {
chroot =
}
# In dovecot 2.3 these services want to change the group owner of the files,
# so override it manually to our effective group.
# This is backwards-compatible with dovecot 2.2.
# TODO: once we stop supporting dovecot 2.2 for tests, we can set
# default_internal_group and remove these settings.
service imap-hibernate {
unix_listener imap-hibernate {
group = $GROUP
}
}
service stats {
unix_listener stats {
group = $GROUP
}
unix_listener stats-writer {
group = $GROUP
}
}
service dict {
unix_listener dict {
group = $GROUP
}
}
service dict-async {
unix_listener dict-async {
group = $GROUP
}
}
# Turn on debugging information, to help troubleshooting issues.
auth_verbose = yes
auth_debug = yes
auth_debug_passwords = yes
auth_verbose_passwords = yes
mail_debug = yes