diff --git a/roles/docker/tasks/services/mailman.yml b/roles/docker/tasks/services/mailman.yml index 9ab7c46..90abfe7 100644 --- a/roles/docker/tasks/services/mailman.yml +++ b/roles/docker/tasks/services/mailman.yml @@ -1,5 +1,11 @@ --- +- name: copy nginx configuration to link static files + template: + src: "templates/mailman/nginx_vhost" + dest: "{{ nginx.volume_folder }}/vhost/lists.data.coop" + mode: "0644" + - name: run mailman server containers docker_compose: project_name: "mailman" @@ -27,6 +33,7 @@ MTA: "postfix" SMTP_HOST: "{{ smtp_host }}" SMTP_PORT: "{{ smtp_port }}" + SMTP_HOST_USER: "noop" MM_HOSTNAME: "172.19.199.2" networks: mailman: @@ -52,6 +59,8 @@ MAILMAN_ADMIN_EMAIL: "valberg@orn.li" MAILMAN_REST_URL: "http://172.19.199.2:8001" SECRET_KEY: "{{ mailman_secrets.django_secret_key }}" + SMTP_HOST: "{{ smtp_host }}" + SMTP_PORT: "{{ smtp_port }}" VIRTUAL_HOST: "lists.data.coop" VIRTUAL_PORT: 8000 LETSENCRYPT_HOST: "lists.data.coop" diff --git a/roles/docker/tasks/services/nginx-proxy.yml b/roles/docker/tasks/services/nginx-proxy.yml index 7e8ff41..ec36f0b 100644 --- a/roles/docker/tasks/services/nginx-proxy.yml +++ b/roles/docker/tasks/services/nginx-proxy.yml @@ -29,6 +29,7 @@ - "{{ nginx.volume_folder }}/html:/usr/share/nginx/html" - "{{ nginx.volume_folder }}/dhparam:/etc/nginx/dhparam" - "{{ nginx.volume_folder }}/certs:/etc/nginx/certs:ro" + - "{{ volume_root_folder }}:/docker-volumes/:ro" - /var/run/docker.sock:/tmp/docker.sock:ro - name: nginx letsencrypt container diff --git a/roles/docker/tasks/services/postfix.yml b/roles/docker/tasks/services/postfix.yml index 9483d9e..7dfdf23 100644 --- a/roles/docker/tasks/services/postfix.yml +++ b/roles/docker/tasks/services/postfix.yml @@ -16,6 +16,9 @@ - 192.168.0.0/16 - 172.19.199.2 - 172.19.199.3 + allowed_sender_domains: + - "{{ base_domain }}" + - "lists.data.coop" docker_container: name: postfix image: boky/postfix @@ -23,5 +26,5 @@ networks: - name: postfix env: - ALLOWED_SENDER_DOMAINS: "{{ base_domain }}" + ALLOWED_SENDER_DOMAINS: "{{ allowed_sender_domains|join(' ') }}" MYNETWORKS: "{{ mynetworks|join(',') }}" diff --git a/roles/docker/templates/mailman/nginx_vhost b/roles/docker/templates/mailman/nginx_vhost new file mode 100644 index 0000000..bb76770 --- /dev/null +++ b/roles/docker/templates/mailman/nginx_vhost @@ -0,0 +1,3 @@ +location /static/ { + alias {{ volume_root_folder }}/mailman/web/static/; +} \ No newline at end of file