imfreedom/ansible

3341de00894d
Parents f3dd60fe981b
Children 74aae48fd5da
Make sure dovecot auth is all setup for postfix
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/mail/files/dovecot.10-auth.conf Mon Nov 29 21:18:05 2021 -0600
@@ -0,0 +1,1 @@
+auth_mechanisms = plain login
--- a/roles/mail/tasks/dovecot.yaml Sun Nov 28 02:14:22 2021 -0600
+++ b/roles/mail/tasks/dovecot.yaml Mon Nov 29 21:18:05 2021 -0600
@@ -1,16 +1,14 @@
---
- name: "install dovecot"
apt:
- name: "{{ mail_packages }}"
- state: "present"
- cache_valid_time: 3600
- force_apt_get: "yes"
- vars:
- mail_packages:
+ name:
- "dovecot-core"
- "dovecot-imapd"
- "dovecot-lmtpd"
- "dovecot-sieve"
+ state: "present"
+ cache_valid_time: 3600
+ force_apt_get: "yes"
tags:
- "dovecot"
- name: "symlink tls certs"
@@ -39,9 +37,15 @@
register: "packaged_10_auth_conf"
- name: "move 10-auth.conf out of the way"
command: "mv /etc/dovecot/conf.d/10-auth.conf /etc/dovecot/conf.d/10-auth.conf.orig"
- when: "false and packaged_10_auth_conf.stat.exists"
+ when: "packaged_10_auth_conf.stat.exists"
notify:
- "reload dovecot"
+- name: "copy 10-auth.conf"
+ copy:
+ src: "dovecot.10-auth.conf"
+ dest: "/etc/dovecot/conf.d/10-auth.conf"
+ mode: 0644
+ notify: "reload dovecot"
- name: "add checkpassword based auth configuration"
template:
src: "dovecot-10-auth-checkpassword.conf.j2"