Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

70 linhas
2.8 KiB

  1. ---
  2. - name: define Postfix virtual mailbox domain mapping
  3. template: src=mysql-virtual-mailbox-domains.cf.j2 dest=/etc/postfix/mysql-virtual-mailbox-domains.cf
  4. notify: restart postfix
  5. - name: tell Postfix to use the virtual mailbox domain mapping
  6. shell: postconf virtual_mailbox_domains=mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
  7. - name: define Postfix virtual mailbox mapping
  8. template: src=mysql-virtual-mailbox-maps.cf.j2 dest=/etc/postfix/mysql-virtual-mailbox-maps.cf
  9. notify: restart postfix
  10. - name: tell Postfix to use the virtual mailbox mapping
  11. shell: postconf virtual_mailbox_maps=mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
  12. - name: define Postfix virtual alias mapping
  13. template: src=mysql-virtual-alias-maps.cf.j2 dest=/etc/postfix/mysql-virtual-alias-maps.cf
  14. notify: restart postfix
  15. - name: tell Postfix to use the virtual alias mapping
  16. shell: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf
  17. - name: define Postfix email-to-email mapping (required for catchall domains)
  18. template: src=mysql-email2email.cf.j2 dest=/etc/postfix/mysql-email2email.cf
  19. notify: restart postfix
  20. - name: tell Postfix to use the email-to-email mapping
  21. shell: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
  22. - name: Restricting access to database mapping files that contain a password
  23. file: path=/etc/postfix/mysql-{{item}}.cf mode=0640
  24. with_items:
  25. - virtual-mailbox-domains
  26. - virtual-mailbox-maps
  27. - virtual-alias-maps
  28. - name: Define dovecot service in master.cf
  29. shell: postconf -vM dovecot/unix='dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}'
  30. notify: restart postfix
  31. - name: Set virtual_transport to dovecot
  32. shell: postconf virtual_transport=dovecot
  33. - name: Restricting delivery to Dovecot to one email at a time
  34. shell: postconf dovecot_destination_recipient_limit=1
  35. - name: Setting SMTP authentication type to dovecot
  36. shell: postconf smtpd_sasl_type=dovecot
  37. - name: Setting SMTP authentication path/socket
  38. shell: postconf smtpd_sasl_path=private/auth
  39. - name: Enabling SMTP authentication
  40. shell: postconf smtpd_sasl_auth_enable=yes
  41. - name: Setting SMTP encryption security level
  42. shell: postconf smtpd_tls_security_level=may
  43. - name: Setting SMTP encryption security level
  44. shell: postconf smtpd_tls_security_level=may
  45. - name: Enforce SMTP encryption
  46. shell: postconf smtpd_tls_auth_only=yes
  47. - name: Set TLS encryption certificate
  48. shell: postconf smtpd_tls_cert_file=/etc/ssl/certs/mailserver.pem
  49. - name: Set TLS encryption key
  50. shell: postconf smtpd_tls_key_file=/etc/ssl/private/mailserver.pem
  51. - name: Enabling SMTP authentication during the SMTP protocol
  52. shell: postconf smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination