feat(dovecot): ensure strict permissions on vmail directory
Added a new task to ensure the `/var/vmail` directory exists with specific ownership and permissions. - Sets owner and group to `vmail` - Enforces mode `0700` for security - Applied only when dovecot is enabled
This commit is contained in:
@@ -108,6 +108,17 @@
|
|||||||
tags:
|
tags:
|
||||||
- dovecot_config
|
- dovecot_config
|
||||||
|
|
||||||
|
- name: "DOVECOT | Ensure vmail directory permissions"
|
||||||
|
when: dovecot_enabled | default(false)
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /var/vmail
|
||||||
|
state: directory
|
||||||
|
owner: vmail
|
||||||
|
group: vmail
|
||||||
|
mode: '0700'
|
||||||
|
tags:
|
||||||
|
- dovecot_config
|
||||||
|
|
||||||
- name: "DOVECOT | Generate user password hashes"
|
- name: "DOVECOT | Generate user password hashes"
|
||||||
when: dovecot_enabled | default(false) and dovecot_users | length > 0
|
when: dovecot_enabled | default(false) and dovecot_users | length > 0
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
|
|||||||
Reference in New Issue
Block a user