-
+
{{ lang._('No Rspamd plugin found, please install and come back.')}}
{{ partial("layout_partials/base_form",['fields':antispamForm,'id':'frm_antispam_settings'])}}
-
-
+
+
@@ -68,7 +68,7 @@ POSSIBILITY OF SUCH DAMAGE.
// check if Rspamd plugin is installed
ajaxCall(url="/api/postfix/service/checkrspamd", sendData={}, callback=function(data,status) {
- if (data == "0") {
+ if (data == "0") {
$('#missing_rspamd').show();
}
});
@@ -76,7 +76,7 @@ POSSIBILITY OF SUCH DAMAGE.
// link save button to API set action
$("#saveAct").click(function () {
saveFormToEndpoint(url="/api/postfix/general/set", formid='frm_general_settings',callback_ok=function () {
- $("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
+ $("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/postfix/service/reconfigure", sendData={}, callback=function (data,status) {
ajaxCall(url="/api/postfix/service/status", sendData={}, callback=function (data,status) {
updateServiceStatusUI(data['status']);
@@ -87,12 +87,12 @@ POSSIBILITY OF SUCH DAMAGE.
});
$("#saveAct2").click(function(){
saveFormToEndpoint(url="/api/postfix/antispam/set", formid='frm_antispam_settings',callback_ok=function(){
- $("#saveAct2_progress").addClass("fa fa-spinner fa-pulse");
+ $("#saveAct2_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/postfix/service/reconfigure", sendData={}, callback=function(data,status) {
ajaxCall(url="/api/postfix/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
- $("#saveAct2_progress").removeClass("fa fa-spinner fa-pulse");
+ $("#saveAct2_progress").removeClass("fa fa-spinner fa-pulse");
});
});
});
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 %}