# 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 args = scheme=SHA512-CRYPT username_format=%n /etc/dovecot/users } userdb { driver = static args = uid=vmail gid=vmail home=/var/vmail/%n } {% endif %}