mirror of
https://github.com/chatmail/relay.git
synced 2026-05-11 16:34:39 +00:00
disable some unnecessary rspamd modules
This commit is contained in:
@@ -396,6 +396,26 @@ def _configure_rspamd(dkim_selector: str, mail_domain: str) -> bool:
|
||||
"""Configures rspamd for Rate Limiting."""
|
||||
need_restart = False
|
||||
|
||||
phishing_conf = files.put(
|
||||
name="disable phishing rspamd plugin",
|
||||
src=importlib.resources.files(__package__).joinpath("rspamd/phishing.conf"),
|
||||
dest="/etc/rspamd/local.d/phishing.conf",
|
||||
user="root",
|
||||
group="root",
|
||||
mode="644",
|
||||
)
|
||||
need_restart |= phishing_conf.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
|
||||
|
||||
dkim_directory = "/var/lib/rspamd/dkim/"
|
||||
dkim_key_path = f"{dkim_directory}{mail_domain}.{dkim_selector}.key"
|
||||
|
||||
|
||||
5
cmdeploy/src/cmdeploy/rspamd/hfilter.conf
Normal file
5
cmdeploy/src/cmdeploy/rspamd/hfilter.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
helo_enabled = false;
|
||||
hostname_enabled = false;
|
||||
url_enabled = false;
|
||||
from_enabled = false;
|
||||
rcpt_enabled = false;
|
||||
1
cmdeploy/src/cmdeploy/rspamd/phishing.conf
Normal file
1
cmdeploy/src/cmdeploy/rspamd/phishing.conf
Normal file
@@ -0,0 +1 @@
|
||||
phishtank_enabled = false;
|
||||
Reference in New Issue
Block a user