diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 53b7d6b24..961cd2ae7 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -1,6 +1,5 @@ PLUGIN_NAME= postfix -PLUGIN_VERSION= 1.6 -PLUGIN_REVISION= 1 +PLUGIN_VERSION= 1.7 PLUGIN_COMMENT= SMTP mail relay PLUGIN_DEPENDS= postfix-sasl PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/mail/postfix/pkg-descr b/mail/postfix/pkg-descr index 1e96d0531..31d9213c7 100644 --- a/mail/postfix/pkg-descr +++ b/mail/postfix/pkg-descr @@ -2,4 +2,13 @@ Postfix attempts to be fast, easy to administer, and secure. The outside has a definite Sendmail-ish flavor, but the inside is completely different. + +Plugin Changelog +================ + +1.7 + +* Add Address Rewriting, allows to rewrite e.g. @example.com to @example.net. + + WWW: http://www.postfix.org/ diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/AddressController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/AddressController.php new file mode 100644 index 000000000..668987631 --- /dev/null +++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/AddressController.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 AddressController extends \OPNsense\Base\IndexController +{ + public function indexAction() + { + $this->view->formDialogEditPostfixAddress = $this->getForm("dialogEditPostfixAddress"); + $this->view->pick('OPNsense/Postfix/address'); + } +} diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/AddressController.php b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/AddressController.php new file mode 100644 index 000000000..6eb1739e5 --- /dev/null +++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/AddressController.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 AddressController extends ApiMutableModelControllerBase +{ + static protected $internalModelName = 'address'; + static protected $internalModelClass = '\OPNsense\Postfix\Address'; + + public function searchAddressAction() + { + return $this->searchBase('addresses.address', array("enabled", "from", "to")); + } + + public function getAddressAction($uuid = null) + { + return $this->getBase('address', 'addresses.address', $uuid); + } + + public function addAddressAction() + { + return $this->addBase('address', 'addresses.address'); + } + + public function delAddressAction($uuid) + { + return $this->delBase('addresses.address', $uuid); + } + + public function setAddressAction($uuid) + { + return $this->setBase('address', 'addresses.address', $uuid); + } + + public function toggleAddressAction($uuid) + { + return $this->toggleBase('addresses.address', $uuid); + } +} diff --git a/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixAddress.xml b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixAddress.xml new file mode 100644 index 000000000..735af7661 --- /dev/null +++ b/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixAddress.xml @@ -0,0 +1,22 @@ +
diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Address.php b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Address.php new file mode 100644 index 000000000..688ae41d3 --- /dev/null +++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Address.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 Address extends BaseModel +{ +} diff --git a/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Address.xml b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Address.xml new file mode 100644 index 000000000..ffaf8c949 --- /dev/null +++ b/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Address.xml @@ -0,0 +1,21 @@ +| {{ lang._('Enabled') }} | +{{ lang._('Rewrite From') }} | +{{ lang._('Rewrite To') }} | +{{ lang._('ID') }} | +{{ lang._('Commands') }} |
|---|---|---|---|---|
| + | + + + | +