mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
mail/postfix: Duplicate Message Fix, Milter Default Action Choice and Recipient Address Verification (#2133)
* mail/postfix: Set 'milter_protocol' to version 6 * mail/postfix: Use default milter macros * mail/postfix: Add milter_default_action choice * mail/rspamd+postfix: Use Unix Sockets * mail/postfix: Add Recipient Address Verification * mail/postfix+rspamd: Update version information
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= postfix
|
||||
PLUGIN_VERSION= 1.17
|
||||
PLUGIN_VERSION= 1.18
|
||||
PLUGIN_COMMENT= SMTP mail relay
|
||||
PLUGIN_DEPENDS= postfix-sasl
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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' %}
|
||||
@@ -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(', ') }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= rspamd
|
||||
PLUGIN_VERSION= 1.10
|
||||
PLUGIN_VERSION= 1.11
|
||||
PLUGIN_COMMENT= Protect your network from spam
|
||||
PLUGIN_DEPENDS= rspamd
|
||||
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
|
||||
|
||||
@@ -5,6 +5,10 @@ lua.
|
||||
Plugin Changelog
|
||||
----------------
|
||||
|
||||
1.11
|
||||
|
||||
* Fix Milter Protocol by binding to Unix Sockets
|
||||
|
||||
1.10
|
||||
|
||||
* Add nameserver option
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 %}
|
||||
@@ -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 %}
|
||||
Reference in New Issue
Block a user