1 - name: install postfix
2 apt: name=postfix,bsd-mailx state=latest
3 - name: install postfix-mysql
4 when: postfix.vmail_mysql_password is defined
5 apt: name=postfix-mysql state=latest
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
18 when: postfix.vmail_mysql_password is defined
20 dest: /etc/postfix/{{ item }}
21 src: templates/{{ item }}
25 - mysql_vmail_aliases.cf
26 - mysql_vmail_senders.cf
27 - mysql_vmail_users.cf
29 - name: create empty maps
30 when: postfix.virtual_mailbox_domains is defined
32 dest: /etc/postfix/{{ item }}
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