mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
mail/rspamd: add whitelisting to greylist (#1287)
* Update Makefile * Update pkg-descr * Create greylist_ip.wl * Update greylist.conf * Update +TARGETS * Update RSpamd.xml * Update settings.xml
This commit is contained in:
committed by
Fabian Franz BSc
parent
d242d5c792
commit
e661db54c3
@@ -1,6 +1,5 @@
|
||||
PLUGIN_NAME= rspamd
|
||||
PLUGIN_VERSION= 1.4
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_VERSION= 1.5
|
||||
PLUGIN_COMMENT= Protect your network from spam
|
||||
PLUGIN_DEPENDS= rspamd
|
||||
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
Rspamd is fast, modular and lightweight spam filter. It is designed to work
|
||||
with big amount of mail and can be easily extended with own filters written in
|
||||
lua.
|
||||
|
||||
Plugin Changelog
|
||||
----------------
|
||||
|
||||
1.5
|
||||
|
||||
* Add whitelisting to Graylist section
|
||||
|
||||
@@ -138,6 +138,14 @@
|
||||
<type>text</type>
|
||||
<help>Mask bits are used to limit the network range from which the message may be resent. This is used to avoid a rejection if another server sends the second mail.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>rspamd.graylist.whitelist_ip</id>
|
||||
<label>Whitelisted IPs</label>
|
||||
<type>select_multiple</type>
|
||||
<style>tokenize</style>
|
||||
<allownew>true</allownew>
|
||||
<help>Mails from IPs or networks in CIDR format entered here will be whitelisted from graylisting.</help>
|
||||
</field>
|
||||
</subtab>
|
||||
<subtab id="rspamd-anti-spam-dkim" description="DKIM">
|
||||
<!-- dkim -->
|
||||
|
||||
@@ -173,6 +173,10 @@
|
||||
<default>64</default>
|
||||
<ValidationMessage>A valid IPv6 mask must be between 1 and 128 bits. 64 bits are recommended as this is the recommended subnet size in IPv6.</ValidationMessage>
|
||||
</ipv6mask>
|
||||
<whitelist_ip type="CSVListField">
|
||||
<Required>N</Required>
|
||||
<mask>/^([a-fA-F0-9\.:\[\]\/]*?,)*([a-fA-F0-9\.:\[\]\/]*)$/</mask>
|
||||
</whitelist_ip>
|
||||
</graylist>
|
||||
|
||||
<dkim>
|
||||
|
||||
@@ -10,6 +10,7 @@ spamtrap.conf:/usr/local/etc/rspamd/local.d/spamtrap.conf
|
||||
surbl-whitelist.inc.local:/var/db/rspamd/surbl-whitelist.inc.local
|
||||
2tld.inc.local:/var/db/rspamd/2tld.inc.local
|
||||
greylist.conf:/usr/local/etc/rspamd/local.d/greylist.conf
|
||||
greylist_ip.wl:/usr/local/etc/rspamd/local.d/greylist_ip.wl
|
||||
phishing.conf:/usr/local/etc/rspamd/local.d/phishing.conf
|
||||
milter_headers.conf:/usr/local/etc/rspamd/local.d/milter_headers.conf
|
||||
multimap.conf:/usr/local/etc/rspamd/local.d/multimap.conf
|
||||
|
||||
@@ -11,4 +11,5 @@
|
||||
action = "soft reject"; # default greylisted action
|
||||
ipv4_mask = {{ OPNsense.Rspamd.graylist.ipv4mask|default('19') }};
|
||||
ipv6_mask = {{ OPNsense.Rspamd.graylist.ipv6mask|default('64') }};
|
||||
whitelist_ip = "/usr/local/etc/rspamd/local.d/greylist_ip.wl";
|
||||
{% endif %}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{% if helpers.exists('OPNsense.Rspamd.general.enabled') and OPNsense.Rspamd.general.enabled == '1' and helpers.exists('OPNsense.Rspamd.graylist.whitelist_ip') and OPNsense.Rspamd.graylist.whitelist_ip != '' %}
|
||||
{% for host in OPNsense.Rspamd.graylist.whitelist_ip.split(',') %}
|
||||
{{ host }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user