| @@ -18,40 +18,37 @@ | |||
| mode: 0644 | |||
| notify: restart postfix | |||
| # - name: tell Postfix to use the virtual mailbox domain mapping | |||
| # command: postconf virtual_mailbox_domains=mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf | |||
| # - name: define Postfix virtual mailbox mapping | |||
| # template: src=mysql-virtual-mailbox-maps.cf.j2 dest=/etc/postfix/mysql-virtual-mailbox-maps.cf | |||
| # notify: restart postfix | |||
| # - name: tell Postfix to use the virtual mailbox mapping | |||
| # command: postconf virtual_mailbox_maps=mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf | |||
| # - name: define Postfix virtual alias mapping | |||
| # template: src=mysql-virtual-alias-maps.cf.j2 dest=/etc/postfix/mysql-virtual-alias-maps.cf | |||
| # notify: restart postfix | |||
| # - name: tell Postfix to use the virtual alias mapping | |||
| # command: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf | |||
| # - name: define Postfix email-to-email mapping (required for catchall domains) | |||
| # template: src=mysql-email2email.cf.j2 dest=/etc/postfix/mysql-email2email.cf | |||
| # notify: restart postfix | |||
| # - name: tell Postfix to use the email-to-email mapping | |||
| # command: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf | |||
| # - name: Restricting access to database mapping files that contain a password | |||
| # file: path=/etc/postfix/mysql-{{item}}.cf mode=0640 | |||
| # with_items: | |||
| # - virtual-mailbox-domains | |||
| # - virtual-mailbox-maps | |||
| # - virtual-alias-maps | |||
| - name: tell Postfix to use the virtual mailbox domain mapping | |||
| command: postconf virtual_mailbox_domains=mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf | |||
| - name: define Postfix virtual mailbox mapping | |||
| template: src=mysql-virtual-mailbox-maps.cf.j2 dest=/etc/postfix/mysql-virtual-mailbox-maps.cf | |||
| notify: restart postfix | |||
| - name: tell Postfix to use the virtual mailbox mapping | |||
| command: postconf virtual_mailbox_maps=mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf | |||
| - name: define Postfix virtual alias mapping | |||
| template: src=mysql-virtual-alias-maps.cf.j2 dest=/etc/postfix/mysql-virtual-alias-maps.cf | |||
| notify: restart postfix | |||
| - name: tell Postfix to use the virtual alias mapping | |||
| command: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf | |||
| - name: define Postfix email-to-email mapping (required for catchall domains) | |||
| template: src=mysql-email2email.cf.j2 dest=/etc/postfix/mysql-email2email.cf | |||
| notify: restart postfix | |||
| - name: tell Postfix to use the email-to-email mapping | |||
| command: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf | |||
| - name: Restricting access to database mapping files that contain a password | |||
| file: path=/etc/postfix/mysql-{{item}}.cf mode=0640 | |||
| with_items: | |||
| - virtual-mailbox-domains | |||
| - virtual-mailbox-maps | |||
| - virtual-alias-maps | |||
| - name: Make Postfix use LMTP to send emails to Dovecot | |||
| command: postconf virtual_transport=lmtp:unix:private/dovecot-lmtp | |||
| - name: Restricting delivery to Dovecot to one email at a time | |||
| command: postconf dovecot_destination_recipient_limit=1 | |||
| - name: Setting SMTP authentication type to dovecot | |||
| command: postconf smtpd_sasl_type=dovecot | |||