-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathdovecot.yml
More file actions
111 lines (98 loc) · 2.7 KB
/
dovecot.yml
File metadata and controls
111 lines (98 loc) · 2.7 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
- name: DOVECOT | install packages
ansible.builtin.package:
name: "{{ pkg_dovecot }}"
state: present
notify: Restart dovecot
- name: DOVECOT | ensure Dovecot is started and runs at startup
ansible.builtin.service:
name: dovecot
state: started
enabled: yes
- name: DOVECOT | create vmail group
ansible.builtin.group:
name: vmail
gid: 5000
- name: DOVECOT | create vmail user
ansible.builtin.user:
name: vmail
group: vmail
uid: 5000
home: /var/mail
- name: DOVECOT | set secure permissions and ownership on /etc/dovecot
ansible.builtin.file:
path: /etc/dovecot
state: directory
owner: vmail
group: dovecot
mode: o-rwx
- name: DOVECOT | create /var/mail/vhosts
ansible.builtin.file:
path: /var/mail/vhosts
state: directory
owner: vmail
group: vmail
- name: DOVECOT | configure (dovecot.conf)
ansible.builtin.template:
src: etc/dovecot/dovecot.conf.j2
dest: /etc/dovecot/dovecot.conf
owner: vmail
group: dovecot
mode: 0440
notify: Restart dovecot
- name: DOVECOT | configure (10-mail.conf)
ansible.builtin.template:
src: etc/dovecot/conf.d/10-mail.conf.j2
dest: /etc/dovecot/conf.d/10-mail.conf
owner: vmail
group: dovecot
mode: 0440
notify: Restart dovecot
- name: DOVECOT | configure (15-mailboxes.conf)
ansible.builtin.template:
src: etc/dovecot/conf.d/15-mailboxes.conf.j2
dest: /etc/dovecot/conf.d/15-mailboxes.conf
owner: vmail
group: dovecot
mode: 0440
notify: Restart dovecot
- name: DOVECOT | configure (10-auth.conf)
ansible.builtin.template:
src: etc/dovecot/conf.d/10-auth.conf.j2
dest: /etc/dovecot/conf.d/10-auth.conf
owner: vmail
group: dovecot
mode: 0440
notify: Restart dovecot
- name: DOVECOT | configure (dovecot-sql.conf.ext)
ansible.builtin.template:
src: etc/dovecot/dovecot-sql.conf.ext.j2
dest: /etc/dovecot/dovecot-sql.conf.ext
owner: vmail
group: dovecot
mode: 0440
notify: Restart dovecot
- name: DOVECOT | configure (10-master.conf)
ansible.builtin.template:
src: etc/dovecot/conf.d/10-master.conf.j2
dest: /etc/dovecot/conf.d/10-master.conf
owner: vmail
group: dovecot
mode: 0440
notify: Restart dovecot
- name: DOVECOT | configure (10-ssl.conf)
ansible.builtin.template:
src: etc/dovecot/conf.d/10-ssl.conf.j2
dest: /etc/dovecot/conf.d/10-ssl.conf
owner: vmail
group: dovecot
mode: 0440
notify: Restart dovecot
- name: DOVECOT | configure (auth-sql.conf.ext)
ansible.builtin.template:
src: etc/dovecot/conf.d/auth-sql.conf.ext.j2
dest: /etc/dovecot/conf.d/auth-sql.conf.ext
owner: vmail
group: dovecot
mode: 0440
notify: Restart dovecot