From 6e57f1d0c216cc43814ad37fd5a2fd3b042bae14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Thu, 20 Jan 2022 13:36:48 +0000 Subject: [PATCH] Refactor allowed_sender_domains and allow more A new object 'postfix' is created with a list of allowed_sender_domains. Any services that expect to send mail this way should add its sender domain to that list. --- roles/docker/defaults/main.yml | 6 ++++++ roles/docker/tasks/services/postfix.yml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 2d2a04ed..9cf9cc45 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -98,3 +98,9 @@ ttrss: keycloak: domain: sso.{{ base_domain }} volume_folder: "{{ volume_root_folder }}/keycloak" + +postfix: + allowed_sender_domains: + - "services.{{ base_domain }}" + - "{{ passit.domain }}" + - "{{ fider.domain }}" diff --git a/roles/docker/tasks/services/postfix.yml b/roles/docker/tasks/services/postfix.yml index 70f5e5d5..2851b711 100644 --- a/roles/docker/tasks/services/postfix.yml +++ b/roles/docker/tasks/services/postfix.yml @@ -15,5 +15,6 @@ networks: - name: postfix env: - ALLOWED_SENDER_DOMAINS: "services.{{ base_domain }}" + ALLOWED_SENDER_DOMAINS: "{{ postfix.allowed_sender_domains|join(' ') }}" + HOSTNAME: "mail.data.coop" # the name the smtp server will identify itself as