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 }}
38 - name: give postfix user access to opendkim
39 when: postfix.opendkim is defined
46 - name: delete old local-mail cronjob
47 file: path=/etc/cron.daily/local-mail state=absent
48 - name: install check-for-local-mail cronjob
50 dest: /etc/cron.daily/check-for-local-mail
51 src: files/check-for-local-mail
53 - name: install mailman-check cronjob
54 when: postfix.mailman is defined and postfix.mailman
56 dest: /etc/cron.daily/mailman-check
57 src: files/mailman-check
59 - name: remove mailman-check cronjob
60 when: not (postfix.mailman is defined and postfix.mailman)
62 path: /etc/cron.daily/mailman-check