mail/rspamd: add option to set a nameserver (#2025)

This commit is contained in:
Michael
2020-09-10 15:46:28 +02:00
committed by GitHub
parent ca754248bf
commit 9078aea515
6 changed files with 29 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= rspamd
PLUGIN_VERSION= 1.9
PLUGIN_VERSION= 1.10
PLUGIN_COMMENT= Protect your network from spam
PLUGIN_DEPENDS= rspamd
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
+4
View File
@@ -5,6 +5,10 @@ lua.
Plugin Changelog
----------------
1.10
* Add nameserver option
1.9
* Add History Rows field
@@ -62,6 +62,15 @@
<advanced>true</advanced>
<help>Set the number of rows to be displayed in rspamd UI.</help>
</field>
<field>
<id>rspamd.general.nameserver</id>
<label>Nameserver</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<advanced>true</advanced>
<help>Set the nameservers for resolving DNS requests.</help>
</field>
</subtab>
<subtab id="rspamd-general-multimap" description="Multimap Settings">
<field>
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/Rspamd</mount>
<description>rspamd anti spam filter</description>
<version>1.0.1</version>
<version>1.0.2</version>
<items>
<general>
<enabled type="BooleanField">
@@ -126,6 +126,12 @@
<MaximumValue>100000</MaximumValue>
<ValidationMessage>Choose a value between 1 and 100000.</ValidationMessage>
</historyrows>
<nameserver type="HostnameField">
<default>127.0.0.1</default>
<Required>Y</Required>
<FieldSeparator>,</FieldSeparator>
<asList>Y</asList>
</nameserver>
</general>
<milter_headers>
@@ -21,3 +21,4 @@ redis.conf:/usr/local/etc/rspamd/local.d/redis.conf
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
@@ -0,0 +1,7 @@
# Please don't modify this file as your changes might be overwritten with
# the next update.
#
dns {
nameserver = [{{ "'" + ("','".join(OPNsense.Rspamd.general.nameserver.split(','))) + "'" }}];
}