fix(dovecot): use %n instead of %u for username and home path

Update the Dovecot authentication template to use `%n` (user part only)
instead of `%u` (full username) in both the `passdb` username format and
the `userdb` home directory path.

This ensures that user lookups and home directory generation rely specifically
on the username portion, excluding the domain part.
This commit is contained in:
2026-02-10 18:41:44 -03:00
parent e350a39a29
commit a24007383d

View File

@@ -3,10 +3,10 @@
passdb {
driver = passwd-file
args = scheme=SHA512-CRYPT username_format=%u /etc/dovecot/users
args = scheme=SHA512-CRYPT username_format=%n /etc/dovecot/users
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/vmail/%u
args = uid=vmail gid=vmail home=/var/vmail/%n
}