1 - name: install postfix
2 apt: name=postfix,bsd-mailx state=latest
3 - name: install postfix-mysql
4 apt: name=postfix-mysql state=latest
5 when: postfix.vmail_mysql_password is defined
7 service: name=postfix enabled=yes
9 - name: install postfix config
11 dest: /etc/postfix/{{ item }}
12 src: templates/{{ item }}
17 - name: install postfix mysql config
19 dest: /etc/postfix/{{ item }}
20 src: templates/{{ item }}
24 - mysql_vmail_aliases.cf
25 - mysql_vmail_senders.cf
26 - mysql_vmail_users.cf
28 when: postfix.vmail_mysql_password is defined
29 - name: create empty maps
31 dest: /etc/postfix/{{ item }}
37 when: postfix.virtual_mailbox_domains is defined
39 - name: delete old local-mail cronjob
40 file: path=/etc/cron.daily/local-mail state=absent
41 - name: install check-for-local-mail cronjob
43 dest: /etc/cron.daily/check-for-local-mail
44 src: files/check-for-local-mail