fix: Dovecot in Debian Trixie => 2.4 has add / deprecated configurations
All checks were successful
Molecule Tests / molecule-tests (pull_request) Successful in 7m18s
All checks were successful
Molecule Tests / molecule-tests (pull_request) Successful in 7m18s
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
# Dovecot authentication configuration
|
||||
# Ansible managed: {{ ansible_managed }}
|
||||
|
||||
{% if dovecot_major_version is defined and dovecot_major_version is version('2.4', '>=') %}
|
||||
auth_allow_cleartext = {{ 'no' if dovecot_ssl == 'required' else 'yes' }}
|
||||
{% else %}
|
||||
disable_plaintext_auth = {{ 'yes' if dovecot_ssl == 'required' else 'no' }}
|
||||
{% endif %}
|
||||
auth_mechanisms = {{ dovecot_auth_mechanisms }}
|
||||
|
||||
!include auth-dovecot-users.conf.ext
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
# Dovecot mail location configuration
|
||||
# Ansible managed: {{ ansible_managed }}
|
||||
|
||||
{% if dovecot_major_version is defined and dovecot_major_version is version('2.4', '>=') %}
|
||||
{% set _driver = dovecot_mail_location.split(':')[0] %}
|
||||
{% set _path = dovecot_mail_location.split(':')[1] %}
|
||||
mail_driver = {{ _driver }}
|
||||
mail_path = {{ _path }}
|
||||
{% else %}
|
||||
mail_location = {{ dovecot_mail_location }}
|
||||
{% endif %}
|
||||
namespace inbox {
|
||||
inbox = yes
|
||||
|
||||
|
||||
@@ -2,5 +2,10 @@
|
||||
# Ansible managed: {{ ansible_managed }}
|
||||
|
||||
ssl = {{ dovecot_ssl }}
|
||||
{% if dovecot_major_version is defined and dovecot_major_version is version('2.4', '>=') %}
|
||||
ssl_server_cert_file = {{ mail_ssl_cert }}
|
||||
ssl_server_key_file = {{ mail_ssl_key }}
|
||||
{% else %}
|
||||
ssl_cert = <{{ mail_ssl_cert }}
|
||||
ssl_key = <{{ mail_ssl_key }}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# Dovecot local users authentication
|
||||
# Ansible managed: {{ ansible_managed }}
|
||||
{% if dovecot_major_version is defined and dovecot_major_version is version('2.4', '>=') %}
|
||||
|
||||
passdb passwd-file {
|
||||
default_password_scheme = SHA512-CRYPT
|
||||
auth_username_format = %{user|username}
|
||||
passwd_file_path = /etc/dovecot/users
|
||||
}
|
||||
|
||||
userdb static {
|
||||
fields {
|
||||
uid = vmail
|
||||
gid = vmail
|
||||
home = /var/vmail/%{user|username}
|
||||
}
|
||||
}
|
||||
{% else %}
|
||||
|
||||
passdb {
|
||||
driver = passwd-file
|
||||
@@ -10,3 +26,4 @@ userdb {
|
||||
driver = static
|
||||
args = uid=vmail gid=vmail home=/var/vmail/%n
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Dovecot configuration file
|
||||
# Ansible managed: {{ ansible_managed }}
|
||||
{% if dovecot_major_version is defined and dovecot_major_version is version('2.4', '>=') %}
|
||||
dovecot_config_version = 2.4.0
|
||||
dovecot_storage_version = 2.4.0
|
||||
{% endif %}
|
||||
|
||||
protocols = {{ dovecot_protocols }}
|
||||
{% if dovecot_imap_capability | default('') | length > 0 %}
|
||||
|
||||
Reference in New Issue
Block a user