Commit 71c9a0cc authored by Lars Beckers's avatar Lars Beckers

postfix: allow DNS-based config of postscreen filter

parent 89ffd71b
......@@ -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 %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment