Actually disable phising, rbl and hfilter

This commit is contained in:
link2xt 2024-01-12 18:46:07 +00:00
parent 7758c94e31
commit c171866faf
5 changed files with 11 additions and 39 deletions

View File

@ -409,25 +409,16 @@ def _configure_rspamd(dkim_selector: str, mail_domain: str) -> bool:
packages="rspamd", packages="rspamd",
) )
phishing_conf = files.put( for module in ["phishing", "rbl", "hfilter"]:
name="disable phishing rspamd plugin", disabled_module_conf = files.put(
src=importlib.resources.files(__package__).joinpath("rspamd/phishing.conf"), name="disable phishing rspamd plugin",
dest="/etc/rspamd/local.d/phishing.conf", src=importlib.resources.files(__package__).joinpath("rspamd/disabled.conf"),
user="root", dest=f"/etc/rspamd/local.d/{module}.conf",
group="root", user="root",
mode="644", group="root",
) mode="644",
need_restart |= phishing_conf.changed )
need_restart |= disabled_module_conf.changed
rbl = files.put(
name="disable rbl rspamd plugin",
src=importlib.resources.files(__package__).joinpath("rspamd/rbl.conf"),
dest="/etc/rspamd/override.d/rbl.conf",
user="root",
group="root",
mode="644",
)
need_restart |= rbl.changed
options_inc = files.put( options_inc = files.put(
name="disable fuzzy checks", name="disable fuzzy checks",
@ -439,16 +430,6 @@ def _configure_rspamd(dkim_selector: str, mail_domain: str) -> bool:
) )
need_restart |= options_inc.changed need_restart |= options_inc.changed
hfilter = files.put(
name="disable hfilter rspamd plugin",
src=importlib.resources.files(__package__).joinpath("rspamd/hfilter.conf"),
dest="/etc/rspamd/local.d/hfilter.conf",
user="root",
group="root",
mode="644",
)
need_restart |= hfilter.changed
groups_conf = files.put( groups_conf = files.put(
name="set metrics for DKIM, SPF, and DMARC fails", name="set metrics for DKIM, SPF, and DMARC fails",
src=importlib.resources.files(__package__).joinpath( src=importlib.resources.files(__package__).joinpath(

View File

@ -0,0 +1 @@
enabled = false;

View File

@ -1,5 +0,0 @@
helo_enabled = false;
hostname_enabled = false;
url_enabled = false;
from_enabled = false;
rcpt_enabled = false;

View File

@ -1 +0,0 @@
phishtank_enabled = false;

View File

@ -1,4 +0,0 @@
url_whitelist = [];
rbls {
}