No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

100 líneas
3.5 KiB

  1. ---
  2. - name: define Postfix virtual mailbox domain mapping
  3. template:
  4. src: "{{item}}.j2"
  5. dest: "/etc/postfix/{{item}}"
  6. mode: 0640
  7. notify: restart postfix
  8. with_items:
  9. - mysql-virtual-mailbox-domains.cf
  10. - mysql-virtual-mailbox-maps.cf
  11. - mysql-virtual-alias-maps.cf
  12. - mysql-email2email.cf
  13. - name: copy master.cf to enable submission service
  14. copy:
  15. src: master.cf
  16. dest: /etc/postfix/master.cf
  17. mode: 0644
  18. # - name: tell Postfix to use the virtual mailbox domain mapping
  19. # command: postconf virtual_mailbox_domains=mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
  20. # - name: define Postfix virtual mailbox mapping
  21. # template: src=mysql-virtual-mailbox-maps.cf.j2 dest=/etc/postfix/mysql-virtual-mailbox-maps.cf
  22. # notify: restart postfix
  23. # - name: tell Postfix to use the virtual mailbox mapping
  24. # command: postconf virtual_mailbox_maps=mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
  25. # - name: define Postfix virtual alias mapping
  26. # template: src=mysql-virtual-alias-maps.cf.j2 dest=/etc/postfix/mysql-virtual-alias-maps.cf
  27. # notify: restart postfix
  28. # - name: tell Postfix to use the virtual alias mapping
  29. # command: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf
  30. # - name: define Postfix email-to-email mapping (required for catchall domains)
  31. # template: src=mysql-email2email.cf.j2 dest=/etc/postfix/mysql-email2email.cf
  32. # notify: restart postfix
  33. # - name: tell Postfix to use the email-to-email mapping
  34. # command: postconf virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
  35. # - name: Restricting access to database mapping files that contain a password
  36. # file: path=/etc/postfix/mysql-{{item}}.cf mode=0640
  37. # with_items:
  38. # - virtual-mailbox-domains
  39. # - virtual-mailbox-maps
  40. # - virtual-alias-maps
  41. - name: Make Postfix use LMTP to send emails to Dovecot
  42. command: postconf virtual_transport=lmtp:unix:private/dovecot-lmtp
  43. - name: Restricting delivery to Dovecot to one email at a time
  44. command: postconf dovecot_destination_recipient_limit=1
  45. - name: Setting SMTP authentication type to dovecot
  46. command: postconf smtpd_sasl_type=dovecot
  47. - name: Setting SMTP authentication path/socket
  48. command: postconf smtpd_sasl_path=private/auth
  49. - name: Enabling SMTP authentication
  50. command: postconf smtpd_sasl_auth_enable=yes
  51. - name: Setting SMTP encryption security level
  52. command: postconf smtpd_tls_security_level=may
  53. - name: Setting SMTP encryption security level
  54. command: postconf smtpd_tls_security_level=may
  55. - name: Enforce SMTP encryption
  56. command: postconf smtpd_tls_auth_only=yes
  57. - name: Set TLS encryption certificate
  58. command: postconf smtpd_tls_cert_file=/etc/ssl/certs/mailserver.pem
  59. - name: Set TLS encryption key
  60. command: postconf smtpd_tls_key_file=/etc/ssl/private/mailserver.pem
  61. # - name: Enabling Spamassassin milter
  62. # command: postconf smtpd_milters=unix:/spamass/spamass.sock
  63. # - name: Configuring Spamassassin milter
  64. # command: postconf milter_connect_macros="i j {daemon_name} v {if_name} _"
  65. # - name: Setting spamd options
  66. # copy: src=etc-default-spamassassin dest=/etc/default/spamassassin
  67. # notify: restart spamassassin
  68. # - name: Adding user spamass-milter to debian-spamd group
  69. # user: name=spamass-milter groups=debian-spamd
  70. # notify: restart spamassassin
  71. # - name: Enabling spamd at startup
  72. # command: systemctl enable spamassassin
  73. - name: Allow emails up to 40 MB large
  74. command: postconf message_size_limit=41943040
  75. - name: Make Postfix listen on all interfaces
  76. command: postconf inet_interfaces=all