Make sender domain handling even smarter

This commit is contained in:
Sam A. 2024-01-06 19:52:49 +01:00
parent d73222a7fe
commit 2b4d73790f
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
3 changed files with 3 additions and 3 deletions

View file

@ -65,6 +65,7 @@ warn_list:
- latest[git] - latest[git]
- package-latest - package-latest
- var-naming[no-role-prefix] - var-naming[no-role-prefix]
- yaml[line-length]
# - role-name # - role-name
# - yaml[document-start] # you can also use sub-rule matches # - yaml[document-start] # you can also use sub-rule matches

View file

@ -65,5 +65,4 @@ apps_vars:
apps_include: "{{ apps_vars | dict2items | map(attribute='key') | list }}" apps_include: "{{ apps_vars | dict2items | map(attribute='key') | list }}"
apps_backup: "{{ apps_vars | dict2items | selectattr('value.backup', 'true') | map(attribute='key') | list | intersect(apps_include) }}" apps_backup: "{{ apps_vars | dict2items | selectattr('value.backup', 'true') | map(attribute='key') | list | intersect(apps_include) }}"
apps_proxied: "{{ apps_vars | dict2items | selectattr('value.domain', 'defined') | map(attribute='key') | list | intersect(apps_include) }}" apps_proxied: "{{ apps_vars | dict2items | selectattr('value.domain', 'defined') | map(attribute='key') | list | intersect(apps_include) }}"
apps_senders: "{{ apps_vars | dict2items | selectattr('value.sender', 'true') | map(attribute='key') | list | intersect(apps_include) }}" apps_senders: "{{ apps_vars | dict2items | selectattr('value.sender', 'true') | selectattr('key', 'in', apps_include) | map(attribute='value.domain') | list }}"
apps_sender_domains: "{{ apps_vars | dict2items | selectattr('key', 'in', apps_senders) | map(attribute='value.domain') | list }}"

View file

@ -8,7 +8,7 @@ services:
image: boky/postfix:{{ apps_vars.postfix.version }} image: boky/postfix:{{ apps_vars.postfix.version }}
restart: always restart: always
environment: environment:
ALLOWED_SENDER_DOMAINS: {{ apps_sender_domains | join(' ') }} ALLOWED_SENDER_DOMAINS: {{ apps_senders | join(' ') }}
HOSTNAME: {{ apps_vars.postfix.hostname }} HOSTNAME: {{ apps_vars.postfix.hostname }}
DKIM_AUTOGENERATE: true DKIM_AUTOGENERATE: true
networks: networks: