1 - name: install dovecot
2 apt: name=dovecot-imapd,dovecot-lmtpd,dovecot-mysql,dovecot-pop3d,dovecot-sieve,dovecot-managesieved state=latest
4 service: name=dovecot enabled=yes
6 - name: check mail group
7 shell: "test \"$(id -g mail)\" -eq '{{postfix.dovecot.mail_gid}}'"
9 - name: create vmail user
13 uid: "{{postfix.dovecot.vmail_uid}}"
18 - name: create vmail dir
19 file: name=/var/vmail state=directory owner=vmail group=mail
20 - name: configure dovecot
23 dest: /etc/dovecot/{{ item }}
24 src: templates/dovecot/{{ item }}
30 - conf.d/10-master.conf
35 - conf.d/90-quota.conf
36 - conf.d/auth-sql.conf.ext
37 - dovecot-sql.conf.ext
38 - name: install quota notification script
40 dest: /etc/dovecot/quota-warning.sh
41 src: templates/dovecot/quota-warning.sh
44 - name: create newmail dir
45 file: path=/root/newmail state=directory
46 - name: install newmail script
48 dest: /root/newmail/newmail
49 src: files/newmail/newmail
51 - name: install newmail templates
53 dest: /root/newmail/templates.py
54 src: files/newmail/templates.py
55 - name: install changepw script
56 when: postfix.dovecot.changepw_cgi is defined
58 dest: "{{postfix.dovecot.changepw_cgi}}"
59 src: templates/changepw