Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

dovecot.yml 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. - dovecot-managesieved
  10. - name: Create vmail group
  11. group: name=vmail state=present gid=5000
  12. - name: Create vmail user
  13. user: name=vmail group=vmail state=present uid=5000 home=/decrypted
  14. - name: Ensure mail domain directories are in place
  15. file: state=directory path=/decrypted/{{ item.name }} owner=vmail group=dovecot mode=770
  16. with_items:
  17. - {{ mail_virtual_domains }}
  18. - name: Ensure mail directories are in place
  19. file: state=directory path=/decrypted/{{ item.name }}/{{ item.primary_user }} owner=vmail group=dovecot
  20. with_items:
  21. - {{ mail_virtual_domains }}
  22. - name: Copy dovecot.conf into place
  23. copy: src=etc_dovecot_dovecot.conf dest=/etc/dovecot/dovecot.conf
  24. - name: Copy additional Dovecot configuration files in place
  25. copy: src=etc_dovecot_conf.d_{{ item }} dest=/etc/dovecot/conf.d/{{ item }}
  26. with_items:
  27. - 10-mail.conf
  28. - 10-auth.conf
  29. - auth-sql.conf.ext
  30. - 10-master.conf
  31. - 10-ssl.conf
  32. notify: restart dovecot
  33. - name: Template 15-lda.conf
  34. template: src=etc_dovecot_conf.d_15-lda.conf.j2 dest=/etc/dovecot/conf.d/15-lda.conf
  35. notify: restart dovecot
  36. - name: Template dovecot-sql.conf.ext
  37. template: src=etc_dovecot_dovecot-sql.conf.ext.j2 dest=/etc/dovecot/dovecot-sql.conf.ext
  38. notify: restart dovecot
  39. - name: Ensure correct permissions on Dovecot config directory
  40. file: state=directory path=/etc/dovecot
  41. group=dovecot owner=vmail mode=770 recurse=yes
  42. notify: restart dovecot