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.6KB

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