-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure_dovecot.yml
More file actions
35 lines (29 loc) · 966 Bytes
/
configure_dovecot.yml
File metadata and controls
35 lines (29 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
- name: Create vmail group to be used by vmail user
group: name=vmail state=present
- name: Create vmail user for virtual mail domain hosting
user: name=vmail group=vmail create_home=yes
- name: Update dovecot configs in /etc/dovecot/dovecot.conf
template:
src: templates/dovecot.conf.j2
dest: /etc/dovecot/dovecot.conf
backup: yes
notify: reload dovecot
- name: Ensure we have packages for generating the encrypted passwords
apt: "name={{ item }} state=present"
loop:
- python3-passlib
- python3-bcrypt
- name: Create virtual accounts password file
template:
src: templates/etc_dovecot_passwd.j2
dest: /etc/dovecot/passwd
- name: Ensure sieve directories exist
file:
path: /var/lib/dovecot/sieve/global/
state: directory
- name: Configure default sieve for spam filtering
template:
src: templates/default.sieve.j2
dest: /var/lib/dovecot/sieve/default.sieve
notify: pre-compile default sieve