Nessuna descrizione
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.

opendkim.yml 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. # Handy reference: http://stevejenkins.com/blog/2010/09/how-to-get-dkim-domainkeys-identified-mail-working-on-centos-5-5-and-postfix-using-opendkim/
  3. - name: Install OpenDKIM and related packages
  4. apt: pkg={{ item }} state=installed
  5. with_items:
  6. - opendkim
  7. - opendkim-tools
  8. - name: Create OpenDKIM config directory
  9. file: state=directory path=/etc/opendkim group=opendkim owner=opendkim
  10. - name: Create OpenDKIM key directories
  11. file: state=directory path=/etc/opendkim/keys/{{ item.name }} group=opendkim owner=opendkim
  12. with_items: mail_virtual_domains
  13. - name: Generate OpenDKIM keys
  14. command: opendkim-genkey -r -d {{ item.name }} -D /etc/opendkim/keys/{{ item.name }}/ creates=/etc/opendkim/keys/{{ item.name }}/default.private
  15. with_items: mail_virtual_domains
  16. - name: Put opendkim.conf into place
  17. copy: src=etc_opendkim.conf dest=/etc/opendkim.conf owner=opendkim group=opendkim
  18. notify:
  19. - restart opendkim
  20. - restart postfix
  21. - name: Put additional OpenDKIM configuration files into place
  22. template: src=etc_opendkim_{{ item }}.j2 dest=/etc/opendkim/{{ item }} owner=opendkim group=opendkim
  23. with_items:
  24. - KeyTable
  25. - SigningTable
  26. - TrustedHosts
  27. notify:
  28. - restart opendkim
  29. - restart postfix
  30. - name: Set OpenDKIM config directory permissions
  31. file: state=directory path=/etc/opendkim
  32. group=opendkim owner=opendkim mode=700 recurse=yes
  33. notify:
  34. - restart opendkim
  35. - restart postfix