Actually disable phising, rbl and hfilter
This commit is contained in:
parent
7758c94e31
commit
c171866faf
@ -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"]:
|
||||||
|
disabled_module_conf = files.put(
|
||||||
name="disable phishing rspamd plugin",
|
name="disable phishing rspamd plugin",
|
||||||
src=importlib.resources.files(__package__).joinpath("rspamd/phishing.conf"),
|
src=importlib.resources.files(__package__).joinpath("rspamd/disabled.conf"),
|
||||||
dest="/etc/rspamd/local.d/phishing.conf",
|
dest=f"/etc/rspamd/local.d/{module}.conf",
|
||||||
user="root",
|
user="root",
|
||||||
group="root",
|
group="root",
|
||||||
mode="644",
|
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(
|
||||||
|
1
cmdeploy/src/cmdeploy/rspamd/disabled.conf
Normal file
1
cmdeploy/src/cmdeploy/rspamd/disabled.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
enabled = false;
|
@ -1,5 +0,0 @@
|
|||||||
helo_enabled = false;
|
|
||||||
hostname_enabled = false;
|
|
||||||
url_enabled = false;
|
|
||||||
from_enabled = false;
|
|
||||||
rcpt_enabled = false;
|
|
@ -1 +0,0 @@
|
|||||||
phishtank_enabled = false;
|
|
@ -1,4 +0,0 @@
|
|||||||
url_whitelist = [];
|
|
||||||
|
|
||||||
rbls {
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user