暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

opendkim.yml 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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:
  13. - ${mail_virtual_domains}
  14. - name: Generate OpenDKIM keys
  15. command: opendkim-genkey -r -d ${item.name} -D /etc/opendkim/keys/${item.name}/ creates=/etc/opendkim/keys/${item.name}/default.private
  16. with_items:
  17. - ${mail_virtual_domains}
  18. - name: Put opendkim.conf into place
  19. copy: src=etc_opendkim.conf dest=/etc/opendkim.conf owner=opendkim group=opendkim
  20. notify:
  21. - restart opendkim
  22. - restart postfix
  23. - name: Put additional OpenDKIM configuration files into place
  24. template: src=etc_opendkim_{{item}}.j2 dest=/etc/opendkim/{{item}} owner=opendkim group=opendkim
  25. with_items:
  26. - KeyTable
  27. - SigningTable
  28. - TrustedHosts
  29. notify:
  30. - restart opendkim
  31. - restart postfix
  32. - name: Set OpenDKIM config directory permissions
  33. file: state=directory path=/etc/opendkim
  34. group=opendkim owner=opendkim mode=700 recurse=yes
  35. notify:
  36. - restart opendkim
  37. - restart postfix