From b0d1c90a471cc12a5e63554ac583e89cbf00c1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Sun, 27 Nov 2022 14:52:26 +0100 Subject: [PATCH] Don't hardcode domains --- roles/docker/defaults/main.yml | 1 + roles/docker/tasks/services/postfix.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 2a23950..2acddce 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -6,6 +6,7 @@ services: ### Internal services ### postfix: file: postfix.yml + domain: "smtp.{{ base_domain }}" version: "v3.5.0" nginx_proxy: diff --git a/roles/docker/tasks/services/postfix.yml b/roles/docker/tasks/services/postfix.yml index 77dc727..1fb67df 100644 --- a/roles/docker/tasks/services/postfix.yml +++ b/roles/docker/tasks/services/postfix.yml @@ -17,4 +17,4 @@ env: # Get all services which have allowed_sender_domain defined ALLOWED_SENDER_DOMAINS: "{{ services | dict2items | selectattr('value.allowed_sender_domain', 'true') | map(attribute='value.domain') | join(' ') }}" - HOSTNAME: "smtp.{{ base_domain }}" # the name the smtp server will identify itself as + HOSTNAME: "{{ services.postfix.domain }}" # the name the smtp server will identify itself as