Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DomainController extends ApiMutableModelControllerBase

public function searchDomainAction()
{
return $this->searchBase('domains.domain', array("enabled", "domainname", "destination"));
return $this->searchBase('domains.domain', array("enabled", "domainname", "transport", "destination"));
}

public function getDomainAction($uuid = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<type>text</type>
<help>Set the unique domain name to relay for.</help>
</field>
<field>
<id>domain.transport</id>
<label>Transport</label>
<type>text</type>
<help>Set the transport method. If empty, smtp will be used. https://www.postfix.org/transport.5.html</help>
</field>
<field>
<id>domain.destination</id>
<label>Destination</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/postfix/domain</mount>
<description>Postfix domain configuration</description>
<version>1.0.1</version>
<version>1.1.0</version>
<items>
<domains>
<domain type="ArrayField">
Expand All @@ -13,6 +13,12 @@
<Default></Default>
<Required>Y</Required>
</domainname>
<transport type="TextField">
<Default></Default>
<Required>N</Required>
<Mask>/^([0-9a-zA-Z.:\-\[\]]{0,63}[0-9a-zA-Z.\-\[\]])$/u</Mask>
<ValidationMessage>Only 64 of the following characters are allowed: 0-9a-zA-Z.:-[] and must not end with :</ValidationMessage>
</transport>
<destination type="TextField">
<Default></Default>
<Required>N</Required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
<tr>
<th data-column-id="enabled" data-type="string" data-formatter="rowtoggle">{{ lang._('Enabled') }}</th>
<th data-column-id="domainname" data-type="string" data-visible="true">{{ lang._('Domain') }}</th>
<th data-column-id="transport" data-type="string" data-visible="true">{{ lang._('Transport') }}</th>
<th data-column-id="destination" data-type="string" data-visible="true">{{ lang._('Destination') }}</th>
<th data-column-id="uuid" data-type="string" data-identifier="true" data-visible="false">{{ lang._('ID') }}</th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false">{{ lang._('Commands') }}</th> </tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
{% if helpers.exists('OPNsense.postfix.domain.domains.domain') %}
{% for domain in helpers.toList('OPNsense.postfix.domain.domains.domain') %}
{% if domain.enabled == '1' %}
{% if domain.transport|length > 0 %}
{{ domain.domainname }} {{domain.transport}}:{{domain.destination}}
{% else %}
{{ domain.domainname }} smtp:{{ domain.destination }}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
Expand Down