Skip to content
Snippets Groups Projects
Commit 28987fab authored by Lars Beckers's avatar Lars Beckers
Browse files

Merge branch 'ext-1' into 'master'

New flexible configuration features for postfix

See merge request !2
parents 89ffd71b f5e172d1
No related branches found
No related tags found
1 merge request!2New flexible configuration features for postfix
......@@ -12,5 +12,22 @@
#
{% for net in postfix_network_access %}
{% if 'comment' in net %}
{{ net.comment|comment('plain', prefix='', postfix='') }}
{% endif %}
{% if 'cidr' in net %}
{{ net.cidr }} {{ net.action|default('dunno') }}
{% endif %}
{% if 'mx' in net %}
{{ net.mx|comment('plain', prefix='', postfix='') }}
{% for mx in q('dig', net.mx, 'qtype=MX') %}
{% for addr in q('dig', mx.split(' ', maxsplit=1)[-1], 'qtype=A') %}
{{ addr }} {{ net.action|default('dunno') }}
{% endfor %}
{% for addr in q('dig', mx.split(' ', maxsplit=1)[-1], 'qtype=AAAA') %}
{{ addr }} {{ net.action|default('dunno') }}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
......@@ -9,7 +9,7 @@ abuse@{{ domain }} {{ adminaddr }}
{{ alias.src }} {{ alias.dest }}
{% else %}
{% for src in alias.src %}
{{ src }}@{{ alias.domain }} {{ alias.dest }}
{{ src }}@{{ alias.domain }} {{ alias.dest if alias.dest is string else alias.dest|join(', ') }}
{% endfor %}
{% endif %}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment