mirror of
https://github.com/chatmail/relay.git
synced 2026-05-12 17:14:36 +00:00
disable some unnecessary rspamd modules
This commit is contained in:
@@ -398,6 +398,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"
|
||||
|
||||
|
||||
10
cmdeploy/src/cmdeploy/rspamd/dkim_signing.conf.j2
Normal file
10
cmdeploy/src/cmdeploy/rspamd/dkim_signing.conf.j2
Normal file
@@ -0,0 +1,10 @@
|
||||
selector = {{ config.dkim_selector }}
|
||||
use_esld = false # don't cut c1.testrun.org down to testrun.org
|
||||
domain = {
|
||||
{{ config.mail_domain }} {
|
||||
selectors [
|
||||
selector = {{ config.dkim_selector }}
|
||||
path = {{ config.dkim_key_path }}
|
||||
]
|
||||
}
|
||||
}
|
||||
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;
|
||||
2276
cmdeploy/src/cmdeploy/rspamd/redis.conf
Normal file
2276
cmdeploy/src/cmdeploy/rspamd/redis.conf
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user