|
17 | 17 | install_recommends: false |
18 | 18 | with_items: |
19 | 19 | - postfix |
20 | | -# - postfix-ldap |
| 20 | + - postfix-ldap |
21 | 21 | - dovecot-ldap |
22 | 22 | - dovecot-imapd |
23 | 23 | - rsyslog |
24 | | - - dovecot-lmtpd |
| 24 | +# - dovecot-lmtpd |
25 | 25 | # - amavisd-new |
26 | 26 | # - postgrey #TODO |
27 | 27 | # - spamassassin |
28 | 28 | # - clamav-daemon |
29 | 29 |
|
30 | | -#- name: upload ldap-aliases.cf |
31 | | -# template: |
32 | | -# src: ldap-aliases.cf.j2 |
33 | | -# dest: "/etc/postfix/ldap-aliases.cf" |
34 | | -# notify: restart_postfix |
35 | | -#- lineinfile: dest=/etc/postfix/main.cf line="virtual_alias_maps = proxy:ldap:/etc/postfix/ldap-aliases.cf" |
36 | | -# notify: restart_postfix |
| 30 | +- name: upload ldap-aliases.cf |
| 31 | + template: |
| 32 | + src: ldap-aliases.cf.j2 |
| 33 | + dest: "/etc/postfix/ldap-aliases.cf" |
| 34 | + notify: restart_postfix |
| 35 | +- lineinfile: dest=/etc/postfix/main.cf line="virtual_alias_maps = proxy:ldap:/etc/postfix/ldap-aliases.cf" |
| 36 | + notify: restart_postfix |
37 | 37 |
|
38 | | -#- name: upload ldap-domains.cf |
39 | | -# template: |
40 | | -# src: ldap-domains.cf.j2 |
41 | | -# dest: "/etc/postfix/ldap-domains.cf" |
42 | | -# notify: restart_postfix |
43 | | -#- lineinfile: dest=/etc/postfix/main.cf line="virtual_mailbox_domains = proxy:ldap:/etc/postfix/ldap-domains.cf" |
44 | | -# notify: restart_postfix |
| 38 | +- name: upload ldap-domains.cf |
| 39 | + template: |
| 40 | + src: ldap-domains.cf.j2 |
| 41 | + dest: "/etc/postfix/ldap-domains.cf" |
| 42 | + notify: restart_postfix |
| 43 | +- lineinfile: dest=/etc/postfix/main.cf line="virtual_mailbox_domains = proxy:ldap:/etc/postfix/ldap-domains.cf" |
| 44 | + notify: restart_postfix |
45 | 45 |
|
46 | | -#- name: upload ldap-accounts.cf |
47 | | -# template: |
48 | | -# src: ldap-accounts.cf.j2 |
49 | | -# dest: "/etc/postfix/ldap-accounts.cf" |
50 | | -# notify: restart_postfix |
51 | | -#- lineinfile: dest=/etc/postfix/main.cf line="virtual_mailbox_maps = proxy:ldap:/etc/postfix/ldap-accounts.cf" |
52 | | -# notify: restart_postfix |
| 46 | +- name: upload ldap-accounts.cf |
| 47 | + template: |
| 48 | + src: ldap-accounts.cf.j2 |
| 49 | + dest: "/etc/postfix/ldap-accounts.cf" |
| 50 | + notify: restart_postfix |
| 51 | +- lineinfile: dest=/etc/postfix/main.cf line="virtual_mailbox_maps = proxy:ldap:/etc/postfix/ldap-accounts.cf" |
| 52 | + notify: restart_postfix |
| 53 | + |
| 54 | +#TODO remove previous mydestination definition |
| 55 | +- lineinfile: dest=/etc/postfix/main.cf line="mydestination = mail.lilik.it, lists.lilik.it, localhost" state=present |
| 56 | + notify: restart_postfix |
| 57 | + |
| 58 | +- blockinfile: |
| 59 | + dest: "/etc/dovecot/conf.d/10-master.conf" |
| 60 | + insertafter: "unix_listener auth-userdb {" |
| 61 | + content: | |
| 62 | + group = postman |
| 63 | + mode = 0664 |
| 64 | + user = postman |
| 65 | + notify: restart_postfix |
| 66 | + |
| 67 | +- lineinfile: dest=/etc/postfix/main.cf line="virtual_transport = dovecot" state=present |
| 68 | + notify: restart_postfix |
53 | 69 |
|
54 | | -- lineinfile: dest=/etc/postfix/main.cf line="virtual_transport = lmtp:unix:private/dovecot-lmtp" state=present |
| 70 | +- blockinfile: |
| 71 | + dest: /etc/postfix/master.cf |
| 72 | + block: | |
| 73 | + dovecot unix - n n - - pipe |
| 74 | + flags=DRhu user=postman:postman argv=/usr/lib/dovecot/deliver -d ${recipient} -f ${sender} |
55 | 75 | notify: restart_postfix |
56 | 76 |
|
57 | 77 | - name: create postman group |
|
0 commit comments