Single account file with email address as the username
This commit is contained in:
parent
13ea9c20a6
commit
e6f243b079
@ -16,6 +16,7 @@ Role Variables
|
||||
| - | - | - |
|
||||
| dovecot_vhost | inventory_hostname | What mod_md certificate should be used for Dovecot |
|
||||
| dovecot_quota | 1G | Default mail quota for users of the system |
|
||||
| dovecot_users | undefined | list of dictionary with the elements of email address and password (converted to CRYPT-SHA512) |
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
5
templates/Fedora/35/etc/dovecot/accounts
Normal file
5
templates/Fedora/35/etc/dovecot/accounts
Normal file
@ -0,0 +1,5 @@
|
||||
{% if defined dovecot_users and dovecot_users is iterable %}
|
||||
{% foreach user in dovecot_users %}
|
||||
{{ user.email }}:{{ user.password | password_hash('sha512') }}::::::
|
||||
{% endfor %}
|
||||
{% %}
|
@ -14,7 +14,7 @@ mail_home = /var/spool/mail/%d/%u
|
||||
|
||||
passdb {
|
||||
driver = passwd-file
|
||||
args = username_format=%n scheme=SHA512-CRYPT /etc/dovecot/accounts/%d/etc/passwd
|
||||
args = username_format=%n scheme=SHA512-CRYPT /etc/dovecot/accounts
|
||||
}
|
||||
userdb {
|
||||
driver = static
|
||||
|
@ -87,6 +87,11 @@ template_list:
|
||||
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/dovecot/dovecot.conf'
|
||||
- dest: '/etc/dovecot/local.conf'
|
||||
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/dovecot/local.conf'
|
||||
- dest: '/etc/dovecot/accounts'
|
||||
group: 'dovecot'
|
||||
mode: '0600'
|
||||
owner: 'dovecot'
|
||||
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/dovecot/accounts'
|
||||
- dest: '/usr/lib/systemd/system/dovecot-copytls.service'
|
||||
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/usr/lib/systemd/system/dovecot-copytls.service'
|
||||
- dest: '/usr/lib/systemd/system/dovecot-copytls.timer'
|
||||
|
Loading…
x
Reference in New Issue
Block a user