mail/postfix: merge version 1.3 from master

This commit is contained in:
Franco Fichtner 2018-05-29 08:44:09 +02:00
parent 63f6edbc93
commit dcabce0bda
4 changed files with 29 additions and 1 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= postfix
PLUGIN_VERSION= 1.2
PLUGIN_VERSION= 1.3
PLUGIN_COMMENT= SMTP mail relay
PLUGIN_DEPENDS= postfix-sasl
PLUGIN_MAINTAINER= m.muenz@gmail.com

View file

@ -29,6 +29,20 @@
<type>text</type>
<help>The 'Listen IPs' parameter specifies the IP address to listen to. Default is to listen on all interfaces.</help>
</field>
<field>
<id>general.bind_address</id>
<label>Bind SMTP Client Address</label>
<type>text</type>
<advanced>true</advanced>
<help>Specify the IPv4 address the server should bind to for outgoing connections. In most cases empty is fine.</help>
</field>
<field>
<id>general.bind_address6</id>
<label>Bind SMTP Client v6 Address</label>
<type>text</type>
<advanced>true</advanced>
<help>Specify the IPv6 address the server should bind to for outgoing connections. In most cases empty is fine.</help>
</field>
<field>
<id>general.mynetworks</id>
<label>Trusted Networks</label>

View file

@ -23,6 +23,14 @@
<default>all</default>
<Required>Y</Required>
</inet_interfaces>
<bind_address type="NetworkField">
<Required>N</Required>
<AddressFamily>ipv4</AddressFamily>
</bind_address>
<bind_address6 type="NetworkField">
<Required>N</Required>
<AddressFamily>ipv6</AddressFamily>
</bind_address6>
<mynetworks type="CSVListField">
<default>127.0.0.0/8,[::ffff:127.0.0.0]/104,[::1]/128</default>
<Required>Y</Required>

View file

@ -55,6 +55,12 @@ inet_interfaces = {{ OPNsense.postfix.general.inet_interfaces }}
{% else %}
inet_interfaces = all
{% endif %}
{% if helpers.exists('OPNsense.postfix.general.bind_address') and OPNsense.postfix.general.bind_address != '' %}
smtp_bind_address = {{ OPNsense.postfix.general.bind_address }}
{% endif %}
{% if helpers.exists('OPNsense.postfix.general.bind_address6') and OPNsense.postfix.general.bind_address6 != '' %}
smtp_bind_address6 = {{ OPNsense.postfix.general.bind_address6 }}
{% endif %}
{% if helpers.exists('OPNsense.postfix.general.mynetworks') and OPNsense.postfix.general.mynetworks != '' %}
mynetworks = {{ OPNsense.postfix.general.mynetworks.replace(',', ' ') }}
{% else %}