Disable ratelimit module like other modules

This commit is contained in:
link2xt 2024-01-12 18:56:11 +00:00
parent ce9fe920dc
commit 62e25e44fd

View File

@ -408,7 +408,7 @@ def _configure_rspamd(dkim_selector: str, mail_domain: str) -> bool:
packages="rspamd",
)
for module in ["phishing", "rbl", "hfilter"]:
for module in ["phishing", "rbl", "hfilter", "ratelimit"]:
disabled_module_conf = files.put(
name="disable phishing rspamd plugin",
src=importlib.resources.files(__package__).joinpath("rspamd/disabled.conf"),
@ -441,13 +441,6 @@ def _configure_rspamd(dkim_selector: str, mail_domain: str) -> bool:
)
need_restart |= groups_conf.changed
ratelimit_conf = files.file(
name="disable rate limiting",
path="/etc/rspamd/local.d/ratelimit.conf",
present=False,
)
need_restart |= ratelimit_conf.changed
dkim_directory = "/var/lib/rspamd/dkim/"
dkim_key_path = f"{dkim_directory}{mail_domain}.{dkim_selector}.key"
dkim_dns_file = f"{dkim_directory}{mail_domain}.{dkim_selector}.zone"