Skip to content

Commit

Permalink
mail/postfix: fix sort order in smtpd restrictions (opnsense#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
mimugmail authored and fichtner committed Nov 14, 2019
1 parent 78a77d7 commit 21a02ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mail/postfix/Makefile
Original file line number Diff line number Diff line change
@@ -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= [email protected]
Expand Down
4 changes: 4 additions & 0 deletions mail/postfix/pkg-descr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 21a02ba

Please sign in to comment.