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.

dovecot.yml 1.6KB

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