diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/RecipientbccController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/RecipientbccController.php
new file mode 100644
index 000000000..3f642276c
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/RecipientbccController.php
@@ -0,0 +1,67 @@
+
+ * 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.
+ */
+
+namespace OPNsense\Postfix\Api;
+
+use \OPNsense\Base\ApiMutableModelControllerBase;
+
+class RecipientbccController extends ApiMutableModelControllerBase
+{
+ static protected $internalModelName = 'recipientbcc';
+ static protected $internalModelClass = '\OPNsense\Postfix\Recipientbcc';
+
+ public function searchRecipientbccAction()
+ {
+ return $this->searchBase('recipientbccs.recipientbcc', array("enabled", "from", "to"));
+ }
+
+ public function getRecipientbccAction($uuid = null)
+ {
+ return $this->getBase('recipientbcc', 'recipientbccs.recipientbcc', $uuid);
+ }
+
+ public function addRecipientbccAction()
+ {
+ return $this->addBase('recipientbcc', 'recipientbccs.recipientbcc');
+ }
+
+ public function delRecipientbccAction($uuid)
+ {
+ return $this->delBase('recipientbccs.recipientbcc', $uuid);
+ }
+
+ public function setRecipientbccAction($uuid)
+ {
+ return $this->setBase('recipientbcc', 'recipientbccs.recipientbcc', $uuid);
+ }
+
+ public function toggleRecipientbccAction($uuid)
+ {
+ return $this->toggleBase('recipientbccs.recipientbcc', $uuid);
+ }
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/SenderbccController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/SenderbccController.php
new file mode 100644
index 000000000..7b79f79af
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/SenderbccController.php
@@ -0,0 +1,67 @@
+
+ * 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.
+ */
+
+namespace OPNsense\Postfix\Api;
+
+use \OPNsense\Base\ApiMutableModelControllerBase;
+
+class SenderbccController extends ApiMutableModelControllerBase
+{
+ static protected $internalModelName = 'senderbcc';
+ static protected $internalModelClass = '\OPNsense\Postfix\Senderbcc';
+
+ public function searchSenderbccAction()
+ {
+ return $this->searchBase('senderbccs.senderbcc', array("enabled", "from", "to"));
+ }
+
+ public function getSenderbccAction($uuid = null)
+ {
+ return $this->getBase('senderbcc', 'senderbccs.senderbcc', $uuid);
+ }
+
+ public function addSenderbccAction()
+ {
+ return $this->addBase('senderbcc', 'senderbccs.senderbcc');
+ }
+
+ public function delSenderbccAction($uuid)
+ {
+ return $this->delBase('senderbccs.senderbcc', $uuid);
+ }
+
+ public function setSenderbccAction($uuid)
+ {
+ return $this->setBase('senderbcc', 'senderbccs.senderbcc', $uuid);
+ }
+
+ public function toggleSenderbccAction($uuid)
+ {
+ return $this->toggleBase('senderbccs.senderbcc', $uuid);
+ }
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/RecipientbccController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/RecipientbccController.php
new file mode 100644
index 000000000..fb6251648
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/RecipientbccController.php
@@ -0,0 +1,38 @@
+
+ * 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.
+ */
+
+namespace OPNsense\Postfix;
+
+class RecipientbccController extends \OPNsense\Base\IndexController
+{
+ public function indexAction()
+ {
+ $this->view->formDialogEditPostfixRecipientbcc = $this->getForm("dialogEditPostfixRecipientbcc");
+ $this->view->pick('OPNsense/Postfix/recipientbcc');
+ }
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/SenderbccController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/SenderbccController.php
new file mode 100644
index 000000000..4f036a0e7
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/SenderbccController.php
@@ -0,0 +1,38 @@
+
+ * 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.
+ */
+
+namespace OPNsense\Postfix;
+
+class SenderbccController extends \OPNsense\Base\IndexController
+{
+ public function indexAction()
+ {
+ $this->view->formDialogEditPostfixSenderbcc = $this->getForm("dialogEditPostfixSenderbcc");
+ $this->view->pick('OPNsense/Postfix/senderbcc');
+ }
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixRecipientbcc.xml b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixRecipientbcc.xml
new file mode 100644
index 000000000..11d9e0f6e
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixRecipientbcc.xml
@@ -0,0 +1,22 @@
+
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixSenderbcc.xml b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixSenderbcc.xml
new file mode 100644
index 000000000..dea2e2c5a
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixSenderbcc.xml
@@ -0,0 +1,22 @@
+
diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/general.xml b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/general.xml
index 4d6ea164e..715ae7a56 100644
--- a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/general.xml
+++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/general.xml
@@ -69,6 +69,14 @@
textSet the max size for messages to accept, default is 501200000 Byte which is 50MB. Values must be entered in Bytes.
+
+ general.masquerade_domains
+
+
+ select_multiple
+ true
+ Masquerade internal domains to the outside. When you set example.com, the domain host.internal.example.com will be rewritten to exmaple.com when mail leaves the system.
+ general.disable_ssl
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 c19f4ec2f..80c232175 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
@@ -47,6 +47,11 @@
51200000Y
+
+ N
+ /^([0-9a-z\.\-\_]{1,128})(,[0-9a-z\.\-\_]{1,128})*$/ui
+ Only up to 128 of the following characters are allowed: 0-9a-zA-Z.-_
+ 1Y
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 ff4e69047..3bcf13364 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
@@ -4,7 +4,9 @@
+
+
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipientbcc.php b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipientbcc.php
new file mode 100644
index 000000000..b97f50513
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipientbcc.php
@@ -0,0 +1,30 @@
+
+ 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.
+*/
+
+class Recipientbcc extends BaseModel
+{
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipientbcc.xml b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipientbcc.xml
new file mode 100644
index 000000000..f763871c3
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Recipientbcc.xml
@@ -0,0 +1,21 @@
+
+ //OPNsense/postfix/recipientbcc
+ Postfix Recipient BCC configuration
+ 1.0.0
+
+
+
+
+ 1
+ Y
+
+
+ Y
+
+
+ Y
+
+
+
+
+
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Senderbcc.php b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Senderbcc.php
new file mode 100644
index 000000000..9a4b340e9
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Senderbcc.php
@@ -0,0 +1,30 @@
+
+ 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.
+*/
+
+class Senderbcc extends BaseModel
+{
+}
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Senderbcc.xml b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Senderbcc.xml
new file mode 100644
index 000000000..7f2610a92
--- /dev/null
+++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Senderbcc.xml
@@ -0,0 +1,21 @@
+
+ //OPNsense/postfix/senderbcc
+ Postfix Sender BCC configuration
+ 1.0.0
+
+
+
+
+ 1
+ Y
+
+
+ Y
+
+
+ Y
+
+
+
+
+
diff --git a/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/address.volt b/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/address.volt
index 39ba106e9..8c200128e 100644
--- a/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/address.volt
+++ b/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/address.volt
@@ -44,48 +44,24 @@ POSSIBILITY OF SUCH DAMAGE.
}
);
- /*************************************************************************************************************
- * Commands
- *************************************************************************************************************/
-
- /**
- * Reconfigure
- */
- $("#reconfigureAct").click(function(){
- $("#reconfigureAct_progress").addClass("fa fa-spinner fa-pulse");
- ajaxCall("/api/postfix/service/reconfigure", {}, function(data,status) {
- // when done, disable progress animation.
- $("#reconfigureAct_progress").removeClass("fa fa-spinner fa-pulse");
-
- if (status != "success" || data['status'] != 'ok') {
- BootstrapDialog.show({
- type: BootstrapDialog.TYPE_WARNING,
- title: "{{ lang._('Error reconfiguring Postfix') }}",
- message: data['status'],
- draggable: true
- });
- } else {
- ajaxCall("/api/postfix/service/reconfigure", {});
- }
- });
- });
+ {% include 'OPNsense/Postfix/apply.volt' %}
});
-