/
dovecot.yml
26 lines (23 loc) · 957 Bytes
/
dovecot.yml
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
---
- name: Configure Dovecot for SSL
lineinfile: dest=/etc/dovecot/conf.d/10-ssl.conf regexp="{{ item.regexp }}" line="{{ item.line }}"
with_items:
- { regexp: "^#?ssl =", line: "ssl = required" }
- { regexp: "^#?ssl_cert =", line: "ssl_cert = <{{ tls_cert }}" }
- { regexp: "^#?ssl_key =", line: "ssl_key = <{{ tls_key }}" }
notify: Reload dovecot
- name: Increase file limits for dovecot
blockinfile:
path: /etc/login.conf
block: |
dovecot:\
:openfiles-cur=20000:\
:openfiles-max=20000:\
:tc=daemon:
notify: rebuild login.conf
- name: Dovecot Mail storage configuration
lineinfile: dest=/etc/dovecot/conf.d/10-mail.conf regexp="^#?mail_location" line="mail_location = maildir:~/Mail"
notify: Reload dovecot
- name: Configure Dovecot IMAP
lineinfile: dest=/etc/dovecot/dovecot.conf regexp="^#?protocols =" line="protocols = imap"
notify: Reload dovecot