No Description
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.

dovecot.yml 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. - name: Install Dovecot and related packages
  2. apt: pkg=$item state=installed
  3. with_items:
  4. - dovecot-core
  5. - dovecot-imapd
  6. - mysql-server
  7. - dovecot-mysql
  8. - dovecot-lmtpd
  9. - name: Create vmail group
  10. group: name=vmail state=present gid=5000
  11. - name: Create vmail user
  12. user: name=vmail group=vmail state=present uid=5000 home=/decrypted
  13. - name: Ensure mail directories are in place
  14. file: state=directory path=/decrypted/${item.name}/${item.primary_user} owner=vmail group=dovecot
  15. with_items:
  16. - ${mail_virtual_domains}
  17. - name: Copy dovecot.conf into place
  18. copy: src=etc_dovecot_dovecot.conf dest=/etc/dovecot/dovecot.conf
  19. - name: Copy additional Dovecot configuration files in place
  20. copy: src=etc_dovecot_conf.d_${item} dest=/etc/dovecot/conf.d/${item}
  21. with_items:
  22. - 10-mail.conf
  23. - 10-auth.conf
  24. - auth-sql.conf.ext
  25. - 10-master.conf
  26. - 10-ssl.conf
  27. notify: restart dovecot
  28. - name: Template 15-lda.conf
  29. template: src=etc_dovecot_conf.d_15-lda.conf.j2 dest=/etc/dovecot/conf.d/15-lda.conf
  30. notify: restart dovecot
  31. - name: Template dovecot-sql.conf.ext
  32. template: src=etc_dovecot_dovecot-sql.conf.ext.j2 dest=/etc/dovecot/dovecot-sql.conf.ext
  33. notify: restart dovecot
  34. - name: Ensure correct permissions on Dovecot config directory
  35. file: state=directory path=/etc/dovecot
  36. group=dovecot owner=vmail mode=770 recurse=yes
  37. notify: restart dovecot