Просмотр исходного кода

Allow ClientName@domain.com for login via Dovecot/Email (#3204)

* Allow ClientName@domain.com for login

* Run prettier
Jaap Marcus 3 лет назад
Родитель
Сommit
beb05ac7d7
2 измененных файлов с 6 добавлено и 1 удалено
  1. 1 1
      install/common/dovecot/conf.d/10-auth.conf
  2. 5 0
      install/upgrade/versions/1.7.0.sh

+ 1 - 1
install/common/dovecot/conf.d/10-auth.conf

@@ -1,5 +1,5 @@
 disable_plaintext_auth = no
-auth_username_format = %u
+auth_username_format = %Lu
 auth_verbose = yes
 auth_mechanisms = plain login
 !include auth-passwdfile.conf.ext

+ 5 - 0
install/upgrade/versions/1.7.0.sh

@@ -49,6 +49,11 @@ if [ -z "$(grep -e 'condition =  ${lookup{$local_part@$domain}lsearch{/etc/exim4
 	done
 fi
 
+# Allow Email@domain.com for login
+if [ -f "/etc/dovecot/conf.d/10-auth.conf" ]; then
+	sed -i "s/auth_username_format = %u/auth_username_format = %Lu/g" /etc/dovecot/conf.d/10-auth.conf
+fi
+
 # rename /var/run/xx to /run/
 for file in /etc/dovecot/dovecot.conf /etc/clamav/clamd.conf /etc/exim/exim.conf.template /etc/logrotate.d/apache2 /etc/logrotate.d/nginx /etc/mysql/my.cnf /etc/nginx/nginx.conf; do
 	if [ -f "$file" ]; then