Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

94 Zeilen
3.3 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: Allow emails up to 40 MB large
  63. command: postconf message_size_limit=41943040
  64. - name: Make Postfix listen on all interfaces
  65. command: postconf inet_interfaces=all
  66. - name: Set rspamd milter for smtpd
  67. command: postconf smtpd_milters=inet:127.0.0.1:11332
  68. - name: Set rspamd milter for local mails
  69. command: postconf non_smtpd_milters=inet:127.0.0.1:11332
  70. - name: Set rspamd milter macros
  71. command: postconf milter_mail_macros="i {mail_addr} {client_addr} {client_name} {auth_authen}"