From a24007383da28101f5dee763f7303a2a7754e184 Mon Sep 17 00:00:00 2001 From: Luciano Giacchetta Date: Tue, 10 Feb 2026 18:41:44 -0300 Subject: [PATCH] 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. --- templates/auth-dovecot-users.conf.ext.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/auth-dovecot-users.conf.ext.j2 b/templates/auth-dovecot-users.conf.ext.j2 index 6bd69cc..cc72d53 100644 --- a/templates/auth-dovecot-users.conf.ext.j2 +++ b/templates/auth-dovecot-users.conf.ext.j2 @@ -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 }