mail/postfix: fix sort order in smtpd restrictions (#1583)

This commit is contained in:
Michael
2019-11-14 19:31:10 +01:00
committed by Franco Fichtner
parent 78a77d7e63
commit 21a02baf1e
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= postfix
PLUGIN_VERSION= 1.11
PLUGIN_VERSION= 1.12
PLUGIN_COMMENT= SMTP mail relay
PLUGIN_DEPENDS= postfix-sasl
PLUGIN_MAINTAINER= m.muenz@gmail.com
+4
View File
@@ -6,6 +6,10 @@ is completely different.
Plugin Changelog
================
1.12
* Fix sort order to put sender acces in front of recipient access
1.11
* Allow suport for v4 or v6 only or both
@@ -128,15 +128,15 @@ relay_recipient_maps = hash:/usr/local/etc/postfix/recipient_access
{# Sender Restrictions #}
{% set smtpd_recipient_restrictions=[] %}
{% if helpers.exists('OPNsense.postfix.sender.senders.sender') %}
{% do smtpd_recipient_restrictions.append('check_sender_access hash:/usr/local/etc/postfix/sender_access') %}
{% endif %}
{% if helpers.exists('OPNsense.postfix.recipient.recipients.recipient') %}
{% do smtpd_recipient_restrictions.append('check_recipient_access hash:/usr/local/etc/postfix/recipient_access') %}
{% endif %}
{% if helpers.exists('OPNsense.postfix.general.reject_unauth_pipelining') and OPNsense.postfix.general.reject_unauth_pipelining == '1' %}
{% do smtpd_recipient_restrictions.append('reject_unauth_pipelining') %}
{% endif %}
{% if helpers.exists('OPNsense.postfix.sender.senders.sender') %}
{% do smtpd_recipient_restrictions.append('check_sender_access hash:/usr/local/etc/postfix/sender_access') %}
{% endif %}
{% if helpers.exists('OPNsense.postfix.general.reject_unknown_sender_domain') and OPNsense.postfix.general.reject_unknown_sender_domain == '1' %}
{% do smtpd_recipient_restrictions.append('reject_unknown_sender_domain') %}
{% endif %}