ansible-role-postfix/templates/postfix/conf.d/transport_relay.j2

25 lines
655 B
Django/Jinja

### {{ ansible_managed }}
{% if postfix_domains is defined %}
{% for domain in postfix_domains %}
{% if domain.type == "relay" %}
{% if domain.comment is defined %}
# {{ domain.comment }}
{% endif %}
{% if domain.relay is defined %}
{% for relay in domain.relay %}
{{ "%-60s %s" | format(relay.src | default( domain.name ), relay.dest) }}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% if postfix_transport_relay_domains is defined %}
{% for domain in postfix_transport_relay_domains %}
{% if domain.comment is defined %}
# {{ domain.comment }}
{% endif %}
{{ "%-50s %s" | format(domain.name, domain.relay) }}
{% endfor %}
{% endif %}