diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index 47d3ecec4..34ae93dc2 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -1,5 +1,5 @@
PLUGIN_NAME= postfix
-PLUGIN_VERSION= 0.2
+PLUGIN_VERSION= 0.3
PLUGIN_COMMENT= SMTP mail relay
PLUGIN_DEPENDS= postfix-sasl
PLUGIN_MAINTAINER= m.muenz@gmail.com
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/RecipientController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/RecipientController.php
new file mode 100644
index 000000000..a37ae7ba1
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/RecipientController.php
@@ -0,0 +1,205 @@
+request->isGet()) {
+ $mdlRecipient = new Recipient();
+ $result['recipient'] = $mdlRecipient->getNodes();
+ }
+ return $result;
+ }
+
+ public function setAction()
+ {
+ $result = array("result"=>"failed");
+ if ($this->request->isPost()) {
+ // load model and update with provided data
+ $mdlRecipient = new Recipient();
+ $mdlRecipient->setNodes($this->request->getPost("recipient"));
+ // perform validation
+ $valMsgs = $mdlRecipient->performValidation();
+ foreach ($valMsgs as $field => $msg) {
+ if (!array_key_exists("validations", $result)) {
+ $result["validations"] = array();
+ }
+ $result["validations"]["recipient.".$msg->getField()] = $msg->getMessage();
+ }
+ // serialize model to config and save
+ if ($valMsgs->count() == 0) {
+ $mdlRecipient->serializeToConfig();
+ Config::getInstance()->save();
+ $result["result"] = "saved";
+ }
+ }
+ return $result;
+ }
+
+ public function searchRecipientAction()
+ {
+ $this->sessionClose();
+ $mdlRecipient = $this->getModel();
+ $grid = new UIModelGrid($mdlRecipient->recipients->recipient);
+ return $grid->fetchBindRequest(
+ $this->request,
+ array("enabled", "address", "action" )
+ );
+ }
+
+ public function getRecipientAction($uuid = null)
+ {
+ $mdlRecipient = $this->getModel();
+ if ($uuid != null) {
+ $node = $mdlRecipient->getNodeByReference('recipients.recipient.' . $uuid);
+ if ($node != null) {
+ // return node
+ return array("recipient" => $node->getNodes());
+ }
+ } else {
+ $node = $mdlRecipient->recipients->recipient->add();
+ return array("recipient" => $node->getNodes());
+ }
+ return array();
+ }
+
+ public function addRecipientAction()
+ {
+ $result = array("result" => "failed");
+ if ($this->request->isPost() && $this->request->hasPost("recipient")) {
+ $result = array("result" => "failed", "validations" => array());
+ $mdlRecipient = $this->getModel();
+ $node = $mdlRecipient->recipients->recipient->Add();
+ $node->setNodes($this->request->getPost("recipient"));
+ $valMsgs = $mdlRecipient->performValidation();
+ foreach ($valMsgs as $field => $msg) {
+ $fieldnm = str_replace($node->__reference, "recipient", $msg->getField());
+ $result["validations"][$fieldnm] = $msg->getMessage();
+ }
+ if (count($result['validations']) == 0) {
+ unset($result['validations']);
+ // save config if validated correctly
+ $mdlRecipient->serializeToConfig();
+ Config::getInstance()->save();
+ unset($result['validations']);
+ $result["result"] = "saved";
+ }
+ }
+ return $result;
+ }
+
+ public function delRecipientAction($uuid)
+ {
+ $result = array("result" => "failed");
+ if ($this->request->isPost()) {
+ $mdlRecipient = $this->getModel();
+ if ($uuid != null) {
+ if ($mdlRecipient->recipients->recipient->del($uuid)) {
+ $mdlRecipient->serializeToConfig();
+ Config::getInstance()->save();
+ $result['result'] = 'deleted';
+ } else {
+ $result['result'] = 'not found';
+ }
+ }
+ }
+ return $result;
+ }
+
+ public function setRecipientAction($uuid)
+ {
+ if ($this->request->isPost() && $this->request->hasPost("recipient")) {
+ $mdlSetting = $this->getModel();
+ if ($uuid != null) {
+ $node = $mdlSetting->getNodeByReference('recipients.recipient.' . $uuid);
+ if ($node != null) {
+ $result = array("result" => "failed", "validations" => array());
+ $recipientInfo = $this->request->getPost("recipient");
+ $node->setNodes($recipientInfo);
+ $valMsgs = $mdlSetting->performValidation();
+ foreach ($valMsgs as $field => $msg) {
+ $fieldnm = str_replace($node->__reference, "recipient", $msg->getField());
+ $result["validations"][$fieldnm] = $msg->getMessage();
+ }
+ if (count($result['validations']) == 0) {
+ // save config if validated correctly
+ $mdlSetting->serializeToConfig();
+ Config::getInstance()->save();
+ $result = array("result" => "saved");
+ }
+ return $result;
+ }
+ }
+ }
+ return array("result" => "failed");
+ }
+
+ public function toggle_handler($uuid, $elements, $element)
+ {
+ $result = array("result" => "failed");
+ if ($this->request->isPost()) {
+ $mdlSetting = $this->getModel();
+ if ($uuid != null) {
+ $node = $mdlSetting->getNodeByReference($elements . '.'. $element .'.' . $uuid);
+ if ($node != null) {
+ if ($node->enabled->__toString() == "1") {
+ $result['result'] = "Disabled";
+ $node->enabled = "0";
+ } else {
+ $result['result'] = "Enabled";
+ $node->enabled = "1";
+ }
+ // if item has toggled, serialize to config and save
+ $mdlSetting->serializeToConfig();
+ Config::getInstance()->save();
+ }
+ }
+ }
+ return $result;
+ }
+
+ public function toggleRecipientAction($uuid)
+ {
+ return $this->toggle_handler($uuid, 'recipients', 'recipient');
+ }
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/SenderController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/SenderController.php
new file mode 100644
index 000000000..0dded2fed
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/SenderController.php
@@ -0,0 +1,205 @@
+request->isGet()) {
+ $mdlSender = new Sender();
+ $result['sender'] = $mdlSender->getNodes();
+ }
+ return $result;
+ }
+
+ public function setAction()
+ {
+ $result = array("result"=>"failed");
+ if ($this->request->isPost()) {
+ // load model and update with provided data
+ $mdlSender = new Sender();
+ $mdlSender->setNodes($this->request->getPost("sender"));
+ // perform validation
+ $valMsgs = $mdlSender->performValidation();
+ foreach ($valMsgs as $field => $msg) {
+ if (!array_key_exists("validations", $result)) {
+ $result["validations"] = array();
+ }
+ $result["validations"]["sender.".$msg->getField()] = $msg->getMessage();
+ }
+ // serialize model to config and save
+ if ($valMsgs->count() == 0) {
+ $mdlSender->serializeToConfig();
+ Config::getInstance()->save();
+ $result["result"] = "saved";
+ }
+ }
+ return $result;
+ }
+
+ public function searchSenderAction()
+ {
+ $this->sessionClose();
+ $mdlSender = $this->getModel();
+ $grid = new UIModelGrid($mdlSender->senders->sender);
+ return $grid->fetchBindRequest(
+ $this->request,
+ array("enabled", "address", "action" )
+ );
+ }
+
+ public function getSenderAction($uuid = null)
+ {
+ $mdlSender = $this->getModel();
+ if ($uuid != null) {
+ $node = $mdlSender->getNodeByReference('senders.sender.' . $uuid);
+ if ($node != null) {
+ // return node
+ return array("sender" => $node->getNodes());
+ }
+ } else {
+ $node = $mdlSender->senders->sender->add();
+ return array("sender" => $node->getNodes());
+ }
+ return array();
+ }
+
+ public function addSenderAction()
+ {
+ $result = array("result" => "failed");
+ if ($this->request->isPost() && $this->request->hasPost("sender")) {
+ $result = array("result" => "failed", "validations" => array());
+ $mdlSender = $this->getModel();
+ $node = $mdlSender->senders->sender->Add();
+ $node->setNodes($this->request->getPost("sender"));
+ $valMsgs = $mdlSender->performValidation();
+ foreach ($valMsgs as $field => $msg) {
+ $fieldnm = str_replace($node->__reference, "sender", $msg->getField());
+ $result["validations"][$fieldnm] = $msg->getMessage();
+ }
+ if (count($result['validations']) == 0) {
+ unset($result['validations']);
+ // save config if validated correctly
+ $mdlSender->serializeToConfig();
+ Config::getInstance()->save();
+ unset($result['validations']);
+ $result["result"] = "saved";
+ }
+ }
+ return $result;
+ }
+
+ public function delSenderAction($uuid)
+ {
+ $result = array("result" => "failed");
+ if ($this->request->isPost()) {
+ $mdlSender = $this->getModel();
+ if ($uuid != null) {
+ if ($mdlSender->senders->sender->del($uuid)) {
+ $mdlSender->serializeToConfig();
+ Config::getInstance()->save();
+ $result['result'] = 'deleted';
+ } else {
+ $result['result'] = 'not found';
+ }
+ }
+ }
+ return $result;
+ }
+
+ public function setSenderAction($uuid)
+ {
+ if ($this->request->isPost() && $this->request->hasPost("sender")) {
+ $mdlSetting = $this->getModel();
+ if ($uuid != null) {
+ $node = $mdlSetting->getNodeByReference('senders.sender.' . $uuid);
+ if ($node != null) {
+ $result = array("result" => "failed", "validations" => array());
+ $senderInfo = $this->request->getPost("sender");
+ $node->setNodes($senderInfo);
+ $valMsgs = $mdlSetting->performValidation();
+ foreach ($valMsgs as $field => $msg) {
+ $fieldnm = str_replace($node->__reference, "sender", $msg->getField());
+ $result["validations"][$fieldnm] = $msg->getMessage();
+ }
+ if (count($result['validations']) == 0) {
+ // save config if validated correctly
+ $mdlSetting->serializeToConfig();
+ Config::getInstance()->save();
+ $result = array("result" => "saved");
+ }
+ return $result;
+ }
+ }
+ }
+ return array("result" => "failed");
+ }
+
+ public function toggle_handler($uuid, $elements, $element)
+ {
+ $result = array("result" => "failed");
+ if ($this->request->isPost()) {
+ $mdlSetting = $this->getModel();
+ if ($uuid != null) {
+ $node = $mdlSetting->getNodeByReference($elements . '.'. $element .'.' . $uuid);
+ if ($node != null) {
+ if ($node->enabled->__toString() == "1") {
+ $result['result'] = "Disabled";
+ $node->enabled = "0";
+ } else {
+ $result['result'] = "Enabled";
+ $node->enabled = "1";
+ }
+ // if item has toggled, serialize to config and save
+ $mdlSetting->serializeToConfig();
+ Config::getInstance()->save();
+ }
+ }
+ }
+ return $result;
+ }
+
+ public function toggleSenderAction($uuid)
+ {
+ return $this->toggle_handler($uuid, 'senders', 'sender');
+ }
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/RecipientController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/RecipientController.php
new file mode 100644
index 000000000..bab463df0
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/RecipientController.php
@@ -0,0 +1,33 @@
+view->formDialogEditPostfixRecipient = $this->getForm("dialogEditPostfixRecipient");
+ $this->view->pick('OPNsense/Postfix/recipient');
+ }
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/SenderController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/SenderController.php
new file mode 100644
index 000000000..2fc655918
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/SenderController.php
@@ -0,0 +1,33 @@
+view->formDialogEditPostfixSender = $this->getForm("dialogEditPostfixSender");
+ $this->view->pick('OPNsense/Postfix/sender');
+ }
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixRecipient.xml b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixRecipient.xml
new file mode 100644
index 000000000..16dc8217b
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixRecipient.xml
@@ -0,0 +1,20 @@
+
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixSender.xml b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixSender.xml
new file mode 100644
index 000000000..0010f891f
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixSender.xml
@@ -0,0 +1,20 @@
+
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/General.xml b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/General.xml
index 208abb098..865f8bf8e 100644
--- a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/General.xml
+++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/General.xml
@@ -60,14 +60,10 @@
encrypt
-
-
1
Y
-
-
1
Y
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Menu/Menu.xml b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Menu/Menu.xml
index 6c9e95893..df2be2899 100644
--- a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Menu/Menu.xml
+++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Menu/Menu.xml
@@ -3,6 +3,8 @@
+
+
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipient.php b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipient.php
new file mode 100644
index 000000000..14b0017a1
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipient.php
@@ -0,0 +1,30 @@
+
+ //OPNsense/postfix/recipient
+ Postfix recipient configuration
+ 1.0.0
+
+
+
+
+ 1
+ Y
+
+
+ Y
+
+
+ Y
+
+ OK
+ REJECT
+
+
+
+
+
+
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Sender.php b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Sender.php
new file mode 100644
index 000000000..145acfa96
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Sender.php
@@ -0,0 +1,30 @@
+
+ //OPNsense/postfix/sender
+ Postfix sender configuration
+ 1.0.0
+
+
+
+
+ 1
+ Y
+
+
+ Y
+
+
+ Y
+
+ OK
+ REJECT
+
+
+
+
+
+
diff --git a/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/recipient.volt b/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/recipient.volt
new file mode 100644
index 000000000..a96dcfd12
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/recipient.volt
@@ -0,0 +1,110 @@
+{#
+
+OPNsense® is Copyright © 2014 – 2017 by Deciso B.V.
+Copyright (C) 2017 Michael Muenz
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+#}
+
+
+
+
+
+
+
+
+
+ | {{ lang._('Enabled') }} |
+ {{ lang._('Address') }} |
+ {{ lang._('Action') }} |
+ {{ lang._('ID') }} |
+ {{ lang._('Commands') }} |
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+{{ partial("layout_partials/base_dialog",['fields':formDialogEditPostfixRecipient,'id':'dialogEditPostfixRecipient','label':lang._('Edit Recipient')])}}
diff --git a/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/sender.volt b/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/sender.volt
new file mode 100644
index 000000000..5a1d736db
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/sender.volt
@@ -0,0 +1,110 @@
+{#
+
+OPNsense® is Copyright © 2014 – 2017 by Deciso B.V.
+Copyright (C) 2017 Michael Muenz
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+#}
+
+
+
+
+
+
+
+
+
+ | {{ lang._('Enabled') }} |
+ {{ lang._('Address') }} |
+ {{ lang._('Action') }} |
+ {{ lang._('ID') }} |
+ {{ lang._('Commands') }} |
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+{{ partial("layout_partials/base_dialog",['fields':formDialogEditPostfixSender,'id':'dialogEditPostfixSender','label':lang._('Edit Sender')])}}
diff --git a/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/main.cf b/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/main.cf
index e9596102d..e57c9cf6e 100644
--- a/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/main.cf
+++ b/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/main.cf
@@ -98,13 +98,13 @@ milter_default_action = accept
{# Sender Restrictions #}
{% set smtpd_recipient_restrictions=[] %}
-{% if helpers.exists('OPNsense.postfix.general.check_recipient_access') %}
+{% 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.general.check_sender_access') %}
+{% 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' %}
diff --git a/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/recipient_access b/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/recipient_access
index c82b63b8b..1589198bd 100644
--- a/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/recipient_access
+++ b/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/recipient_access
@@ -1,4 +1,9 @@
{% if helpers.exists('OPNsense.postfix.general.enabled') and OPNsense.postfix.general.enabled == '1' %}
-{% if helpers.exists('OPNsense.postfix.general.check_recipient_access') %}
+{% if helpers.exists('OPNsense.postfix.recipient.recipients.recipient') %}
+{% for recipient_list in helpers.toList('OPNsense.postfix.recipient.recipients.recipient') %}
+{% if recipient_list.enabled == '1' %}
+{{ recipient_list.address }} {{ recipient_list.action }}
+{% endif %}
+{% endfor %}
{% endif %}
{% endif %}
diff --git a/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/sender_access b/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/sender_access
index c82b63b8b..65d527315 100644
--- a/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/sender_access
+++ b/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/sender_access
@@ -1,4 +1,9 @@
{% if helpers.exists('OPNsense.postfix.general.enabled') and OPNsense.postfix.general.enabled == '1' %}
-{% if helpers.exists('OPNsense.postfix.general.check_recipient_access') %}
+{% if helpers.exists('OPNsense.postfix.sender.senders.sender') %}
+{% for sender_list in helpers.toList('OPNsense.postfix.sender.senders.sender') %}
+{% if sender_list.enabled == '1' %}
+{{ sender_list.address }} {{ sender_list.action }}
+{% endif %}
+{% endfor %}
{% endif %}
{% endif %}