fix: dovecot mail_home in postfixadmin query

This commit is contained in:
s3lph 2025-02-16 13:43:02 +01:00
parent 2c857e2cb2
commit 1db80f77e6
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5
2 changed files with 3 additions and 3 deletions
galaxy.yml
roles/postfixadmin/templates/etc/dovecot

View file

@ -8,7 +8,7 @@ namespace: s3lph
name: mailserver
# The version of the collection. Must be compatible with semantic versioning
version: '0.5.0'
version: '0.5.1'
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md

View file

@ -12,8 +12,8 @@ default_pass_scheme = BLF-CRYPT
# '%s'<>'smtp' permits login for inactive users, but only if the service is NOT smtp.
# This permits disabled users to still read their mail, but will not allow them to send mail.
password_query = SELECT username AS user,password FROM mailbox WHERE {{ user_filter }} AND ( active='1' OR '%s'<>'smtp' )
user_query = SELECT CONCAT('{{ virtual_mail_home }}', maildir) AS home, {{ virtual_mail_numeric_uid }} AS uid, {{ virtual_mail_numeric_gid }} AS gid, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE {{ user_filter }} AND ( active='1' OR '%s'<>'smtp' )
user_query = SELECT CONCAT('{{ virtual_mail_home }}/', maildir) AS home, {{ virtual_mail_numeric_uid }} AS uid, {{ virtual_mail_numeric_gid }} AS gid, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE {{ user_filter }} AND ( active='1' OR '%s'<>'smtp' )
{% else %}
password_query = SELECT username AS user,password FROM mailbox WHERE {{ user_filter }} AND active='1'
user_query = SELECT CONCAT('{{ virtual_mail_home }}', maildir) AS home, {{ virtual_mail_numeric_uid }} AS uid, {{ virtual_mail_numeric_gid }} AS gid, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE {{ user_filter }} AND active='1'
user_query = SELECT CONCAT('{{ virtual_mail_home }}/', maildir) AS home, {{ virtual_mail_numeric_uid }} AS uid, {{ virtual_mail_numeric_gid }} AS gid, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE {{ user_filter }} AND active='1'
{% endif %}