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.
 
 
 
 
 
 

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