Make sender domain handling smarter
This commit is contained in:
parent
ab48bff23a
commit
d73222a7fe
|
@ -65,4 +65,5 @@ 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='value.domain') | list }}"
|
apps_senders: "{{ apps_vars | dict2items | selectattr('value.sender', 'true') | map(attribute='key') | list | intersect(apps_include) }}"
|
||||||
|
apps_sender_domains: "{{ apps_vars | dict2items | selectattr('key', 'in', apps_senders) | map(attribute='value.domain') | list }}"
|
||||||
|
|
|
@ -8,9 +8,9 @@ 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_senders | join(' ') }}"
|
ALLOWED_SENDER_DOMAINS: {{ apps_sender_domains | join(' ') }}
|
||||||
HOSTNAME: "{{ apps_vars.postfix.hostname }}"
|
HOSTNAME: {{ apps_vars.postfix.hostname }}
|
||||||
DKIM_AUTOGENERATE: "true"
|
DKIM_AUTOGENERATE: true
|
||||||
networks:
|
networks:
|
||||||
{{ apps_postfix_docker_network }}:
|
{{ apps_postfix_docker_network }}:
|
||||||
aliases:
|
aliases:
|
||||||
|
|
Loading…
Reference in a new issue