We can specify both the postfix relay and the group of the process that will send mail.

This commit is contained in:
Andrea Dell'Amico 2020-07-10 19:35:04 +02:00
parent f690efddd6
commit 879ec06002
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@
-A OUTPUT -p tcp -m multiport --dports 25,587,465 -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
{% if postfix_smtp_relay_servers is defined %}
{% for host in postfix_smtp_relay_servers %}
-A OUTPUT -p tcp -m multiport --dports 25,587,465 -m owner --gid-owner postfix -d {{ host }} -j ACCEPT
-A OUTPUT -p tcp -m multiport --dports 25,587,465 -m owner --gid-owner {{ host.group }} -d {{ host.name }} -j ACCEPT
{% endfor %}
{% else %}
-A OUTPUT -p tcp -m multiport --dports 25,587,465 -m owner --gid-owner postfix -d {{ postfix_relay_host }} -j ACCEPT