From 4131e54b245049ccb33c14886d718617af36225e Mon Sep 17 00:00:00 2001
From: Lars Beckers <lars.beckers@rwth-aachen.de>
Date: Fri, 1 Jan 2021 16:48:39 +0100
Subject: [PATCH] dovecot: fix authed username for system users

---
 dovecot/templates/conf.d/10-auth.conf.j2 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dovecot/templates/conf.d/10-auth.conf.j2 b/dovecot/templates/conf.d/10-auth.conf.j2
index 86b5cf4..1da1f35 100644
--- a/dovecot/templates/conf.d/10-auth.conf.j2
+++ b/dovecot/templates/conf.d/10-auth.conf.j2
@@ -48,7 +48,11 @@ disable_plaintext_auth = yes
 # the standard variables here, eg. %Lu would lowercase the username, %n would
 # drop away the domain if it was given, or "%n-AT-%d" would change the '@' into
 # "-AT-". This translation is done after auth_username_translation changes.
+{% if dovecot_auth_system and not dovecot_auth_virtual %}
+auth_username_format = %Ln
+{% else %}
 #auth_username_format = %Lu
+{% endif %}
 
 # If you want to allow master users to log in by specifying the master
 # username within the normal username string (ie. not using SASL mechanism's
-- 
GitLab