Skip to content

Commit

Permalink
mail: sync with master
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Feb 16, 2021
1 parent ced01ca commit c8bf932
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 19 deletions.
3 changes: 1 addition & 2 deletions mail/postfix/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
PLUGIN_NAME= postfix
PLUGIN_VERSION= 1.17
PLUGIN_REVISION= 1
PLUGIN_VERSION= 1.18
PLUGIN_COMMENT= SMTP mail relay
PLUGIN_DEPENDS= postfix-sasl
PLUGIN_MAINTAINER= [email protected]
Expand Down
5 changes: 5 additions & 0 deletions mail/postfix/pkg-descr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ is completely different.
Plugin Changelog
================

1.18

* Add 'milter_default_action' choice
* Fix Milter Protocol

1.17

* Add smtpd_sasl_auth_enable to configuration (by @fhloston)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<help>This will allow Postfix to connect to rspamd via milter protocol.</help>
</field>
<field>
<id>antispam.milter_rspamd</id>
<label>Milter IP Version</label>
<id>antispam.default_action</id>
<label>Milter Default Action</label>
<type>dropdown</type>
<help>Select the IP version for connecting to rspamd.</help>
<help>What Postfix will do when Rspamd becomes temporarily unavailable.</help>
</field>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,10 @@
<label>Reject Unauthenticated Destination</label>
<type>checkbox</type>
</field>
<field>
<id>general.reject_unverified_recipient</id>
<label>Reject Unverified Recipient</label>
<type>checkbox</type>
<help>Use Recipient Address Verification. Please keep in mind that this could put significant load onto the next server.</help>
</field>
</form>
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<model>
<mount>//OPNsense/postfix/antispam</mount>
<description>Postfix Antispam configuration</description>
<version>1.0.1</version>
<version>1.0.2</version>
<items>
<enable_rspamd type="BooleanField">
<default>0</default>
<Required>Y</Required>
</enable_rspamd>
<milter_rspamd type="OptionField">
<default>6</default>
<default_action type="OptionField">
<default>accept</default>
<Required>Y</Required>
<OptionValues>
<Option1 value="6">IPv6</Option1>
<Option2 value="4">IPv4</Option2>
<accept>accept</accept>
<tempfail>tempfail</tempfail>
</OptionValues>
</milter_rspamd>
</default_action>
</items>
</model>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/postfix/general</mount>
<description>Postfix configuration</description>
<version>1.2.4</version>
<version>1.2.5</version>
<items>
<enabled type="BooleanField">
<default>0</default>
Expand Down Expand Up @@ -171,5 +171,9 @@
<default>1</default>
<Required>Y</Required>
</reject_unauth_destination>
<reject_unverified_recipient type="BooleanField">
<default>0</default>
<Required>Y</Required>
</reject_unverified_recipient>
</items>
</model>
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,10 @@ smtpd_sasl_auth_enable = yes
{% endif %}

{% if helpers.exists('OPNsense.postfix.antispam.enable_rspamd') and OPNsense.postfix.antispam.enable_rspamd == '1' %}
smtpd_milters = inet:localhost:11332
non_smtpd_milters = inet:localhost:11332
milter_protocol = {{ OPNsense.postfix.antispam.milter_rspamd }}
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
milter_default_action = accept
smtpd_milters = unix:/var/run/rspamd/milter.sock
non_smtpd_milters = $smtpd_milters
milter_protocol = 6
milter_default_action = {{ OPNsense.postfix.antispam.default_action }}
{% endif %}

{% if helpers.exists('OPNsense.postfix.general.enforce_recipient_check') and OPNsense.postfix.general.enforce_recipient_check == '1' %}
Expand Down Expand Up @@ -179,6 +178,9 @@ relay_recipient_maps = hash:/usr/local/etc/postfix/recipient_access
{% if helpers.exists('OPNsense.postfix.general.reject_unauth_destination') and OPNsense.postfix.general.reject_unauth_destination == '1' %}
{% do smtpd_recipient_restrictions.append('reject_unauth_destination') %}
{% endif %}
{% if helpers.exists('OPNsense.postfix.general.reject_unverified_recipient') and OPNsense.postfix.general.reject_unverified_recipient == '1' %}
{% do smtpd_recipient_restrictions.append('reject_unverified_recipient') %}
{% endif %}

{% if smtpd_recipient_restrictions|length >= 1 %}
smtpd_recipient_restrictions = {{ smtpd_recipient_restrictions | join(', ') }}
Expand Down
3 changes: 1 addition & 2 deletions mail/rspamd/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
PLUGIN_NAME= rspamd
PLUGIN_VERSION= 1.10
PLUGIN_REVISION= 1
PLUGIN_VERSION= 1.11
PLUGIN_COMMENT= Protect your network from spam
PLUGIN_DEPENDS= rspamd
PLUGIN_MAINTAINER= [email protected]
Expand Down
4 changes: 4 additions & 0 deletions mail/rspamd/pkg-descr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ lua.
Plugin Changelog
----------------

1.11

* Fix Milter Protocol by binding to Unix Sockets

1.10

* Add nameserver option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ spamtrap-map:/usr/local/etc/rspamd/maps.d/spamtrap.map
classifier-bayes.conf:/usr/local/etc/rspamd/local.d/classifier-bayes.conf
history_redis.conf:/usr/local/etc/rspamd/local.d/history_redis.conf
options.inc:/usr/local/etc/rspamd/local.d/options.inc
worker-normal.inc:/usr/local/etc/rspamd/local.d/worker-normal.inc
worker-proxy.inc:/usr/local/etc/rspamd/local.d/worker-proxy.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% if helpers.exists('OPNsense.Rspamd.general.enabled') and OPNsense.Rspamd.general.enabled == '1' %}
bind_socket = "/var/run/rspamd/normal.sock mode=0666 owner=rspamd";
{% endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if helpers.exists('OPNsense.Rspamd.general.enabled') and OPNsense.Rspamd.general.enabled == '1' %}
upstream "local" {
default = yes;
hosts = "/var/run/rspamd/normal.sock";
}
bind_socket = "/var/run/rspamd/milter.sock mode=0666 owner=rspamd";
{% endif %}

0 comments on commit c8bf932

Please sign in to comment.