Merge pull request 'loop on the allowed networks when configuring the rules for a smtp relay.' (#221) from adellam/ansible-roles:master into master

This commit is contained in:
Andrea Dell'Amico 2020-07-01 18:36:01 +02:00
commit 093d0ed1ba
1 changed files with 3 additions and 1 deletions

View File

@ -243,7 +243,9 @@
#
# These are only needed on the machines that act as relay servers
#
-A INPUT -p tcp -m multiport --dports 25,587,465 -s {{ network.nmis }} -j ACCEPT
{% for cidr in postfix_relay_server_permitted_networks %}
-A INPUT -p tcp -m multiport --dports 25,587,465 -s {{ cidr }} -j ACCEPT
{% endfor %}
-A INPUT -p tcp -m multiport --dports 25,587,465 -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -p tcp -m multiport --dports 25,587,465 -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
{% if postfix_use_relay_host is defined and postfix_use_relay_host %}