From 252bc20ce5b161e20724e2f21ccb13bba3b7ed58 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 4 Jul 2014 17:48:52 +0200 Subject: Tell Dovecot we have a remote IMAP proxy. --- roles/IMAP/tasks/imap.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'roles/IMAP/tasks') diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml index aadcb6e..71a0cb4 100644 --- a/roles/IMAP/tasks/imap.yml +++ b/roles/IMAP/tasks/imap.yml @@ -116,8 +116,22 @@ notify: - Restart Dovecot +- name: Tell Dovecot we have a remote IMAP proxy + # XXX: we should have an automatic lookup here + lineinfile: dest=/etc/dovecot/dovecot.conf + regexp='^(\s*#)?\s*login_trusted_networks\s*=' + line='login_trusted_networks = 171.25.193.76/32' + state=present + create=yes + owner=root group=root + mode=0644 + register: r3 + when: "'IMAP' in group_names and 'webmail' not in group_names" + notify: + - Restart Dovecot + - name: Start Dovecot service: name=dovecot state=started - when: not (r1.changed or r2.changed) + when: not (r1.changed or r2.changed or r3.changed) - meta: flush_handlers -- cgit v1.2.3