use confd for most settings

This commit is contained in:
Mauro Torrez
2019-09-10 00:37:48 -03:00
parent 77fb4caf93
commit 1ef3a28a71
21 changed files with 219 additions and 455 deletions

View File

@@ -11,16 +11,17 @@
dest: /root/.dovecot-docker-image
loop:
- Dockerfile
- 10-auth.conf.tmpl
- 10-mail.conf
- 10-master.conf
- 10-ssl.conf
- 11-quota.conf
- 15-mailboxes.conf
- 20-imap.conf
- 20-lmtp.conf.tmpl
- 90-antispam.conf
- 90-sieve.conf
- auth-ldap.conf.ext
- auth-master.conf.ext
- ldap.conf.ext
- junk-filter.sieve
- local.conf
- submission.conf.tmpl
@@ -50,6 +51,11 @@
- 143:143
- 2000:2000
env:
MAIL_DOMAINS: "{{ mail_domains.keys() | list | join(' ') }}"
AUTH_MECHANISMS: "{{ dovecot_auth_mechanisms }}"
AUTH_USERNAME_FORMAT: "{{ dovecot_auth_username_format }}"
AUTH_LDAP_ENABLE: "{{ 'yes' if dovecot_ldap_enable else '' }}"
AUTH_MASTER_ENABLE: "{{ 'yes' if dovecot_auth_master_enable else '' }}"
SUBMISSION_ENABLE: "yes"
SUBMISSION_RELAY_HOST: postfix
SUBMISSION_RELAY_PORT: "25"
@@ -60,7 +66,20 @@
# SUBMISSION_RELAY_SSL: starttls
# SUBMISSION_RELAY_SSL_VERIFY: "no"
# SUBMISSION_RELAY_RAWLOG_DIR:
register: container
LDAP_HOSTS: "{{ dovecot_ldap_hosts | join(' ') }}"
LDAP_URIS: "{{ dovecot_ldap_uris | join(' ') }}"
LDAP_BIND: "{{ 'yes' if dovecot_ldap_bind else 'no' }}"
LDAP_VERSION: "{{ dovecot_ldap_version }}"
LDAP_BASE: "{{ dovecot_ldap_base }}"
LDAP_SCOPE: "{{ dovecot_ldap_scope }}"
LDAP_USER_ATTRS: "{{ dovecot_ldap_user_attrs }}"
LDAP_USER_FILTER: "{{ dovecot_ldap_user_filter }}"
LDAP_PASS_ATTRS: "{{ dovecot_ldap_pass_attrs }}"
LDAP_PASS_FILTER: "{{ dovecot_ldap_pass_filter }}"
LDAP_ITERATE_ATTRS: "{{ dovecot_ldap_iterate_attrs }}"
LDAP_ITERATE_FILTER: "{{ dovecot_ldap_iterate_filter }}"
LDAP_DEFAULT_PASS_SCHEME: "{{ dovecot_ldap_default_pass_scheme }}"
REGISTER: container
- name: Leer info de volumen {{ dovecot_volume_config }}
docker_volume_info:
@@ -87,24 +106,12 @@
dovecot_volume_ssl: "{{ lookup('vars','dovecot_volume_ssl') }}"
dovecot_mountpoint_ssl: "{{ res_ssl.volume.Mountpoint }}"
- name: Configuración de Dovecot (1)
template:
dest: "{{ dovecot_mountpoint_config }}/conf.d/{{ item }}"
src: "{{item}}.j2"
loop:
- 10-auth.conf
- 20-lmtp.conf
- 90-quota.conf
notify: restart dovecot
- name: Configuración de Dovecot (2-LDAP)
template:
dest: "{{ dovecot_mountpoint_config }}/dovecot-ldap.conf.ext"
src: "dovecot-ldap.conf.ext.j2"
notify: restart dovecot
- name: Configuración de Dovecot (3-LDAP)
template:
dest: "{{ dovecot_mountpoint_config }}/dovecot-ldap2.conf.ext"
src: "dovecot-ldap.conf.ext.j2"
notify: restart dovecot
# FIXME: configurar quota mediante confd
#
# - name: Configuración de Dovecot (1)
# template:
# dest: "{{ dovecot_mountpoint_config }}/conf.d/{{ item }}"
# src: "{{item}}.j2"
# loop:
# - 90-quota.conf
# notify: restart dovecot