Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.4 KiB

  1. - include: service.yaml
  2. vars:
  3. service_name: clamav-daemon
  4. service_packages:
  5. - clamav-daemon
  6. install_recommends: yes
  7. - include: service.yaml
  8. vars:
  9. service_name: amavisd-milter
  10. service_packages:
  11. - amavisd-milter
  12. - spamassassin
  13. install_recommends: yes
  14. - name: disable spamassassin at boot
  15. service: name="spamassassin" enabled=no
  16. # TODO spam, discard spam instead of bouncing it
  17. # /etc/amavis/conf.d/
  18. # $final_spam_destiny = D_DISCARD;
  19. - name: configure amavisd-milter socket
  20. blockinfile:
  21. dest: '/etc/default/amavisd-milter'
  22. block: |
  23. MILTERSOCKET=inet:60001@127.0.0.1
  24. notify: restart amavisd-milter
  25. - name: add amavis milter for smtp to postfix
  26. lineinfile:
  27. dest: '/etc/postfix/main.cf'
  28. line: 'smtpd_milters=inet:127.0.0.1:60001'
  29. regexp: '^smtpd_milters='
  30. notify: restart postfix
  31. - name: add amavis milter for non smtp to postfix
  32. lineinfile:
  33. dest: '/etc/postfix/main.cf'
  34. line: 'non_smtpd_milters=inet:127.0.0.1:60001'
  35. regexp: '^non_smtpd_milters='
  36. notify: restart postfix
  37. - include: service.yaml
  38. vars:
  39. service_name: postgrey
  40. service_packages:
  41. - postgrey
  42. - name: add postgrey to postfix
  43. lineinfile:
  44. dest: '/etc/postfix/main.cf'
  45. line: 'smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10023'
  46. notify: restart postfix