diff --git a/cmdeploy/src/cmdeploy/__init__.py b/cmdeploy/src/cmdeploy/__init__.py index 85917b78..461ba0fc 100644 --- a/cmdeploy/src/cmdeploy/__init__.py +++ b/cmdeploy/src/cmdeploy/__init__.py @@ -451,6 +451,18 @@ def _configure_rspamd(dkim_selector: str, mail_domain: str) -> bool: ) need_restart |= hfilter.changed + groups_conf = files.put( + name="set metrics for DKIM, SPF, and DMARC fails", + src=importlib.resources.files(__package__).joinpath( + "rspamd/policies_group.conf" + ), + dest="/etc/rspamd/local.d/policies_group.conf", + user="root", + group="root", + mode="644", + ) + need_restart |= groups_conf.changed + redis_conf = files.put( name="enable redis for caching", src=importlib.resources.files(__package__).joinpath("rspamd/rspamd_redis.conf"), diff --git a/cmdeploy/src/cmdeploy/rspamd/policies_group.conf b/cmdeploy/src/cmdeploy/rspamd/policies_group.conf new file mode 100644 index 00000000..6ad714d8 --- /dev/null +++ b/cmdeploy/src/cmdeploy/rspamd/policies_group.conf @@ -0,0 +1,14 @@ +symbols { + "R_DKIM_REJECT" { + weight = 15; + } + "R_SPF_FAIL" { + weight = 15; + } + "R_DKIM_NA" { + weight = 15; + } + "DMARC_POLICY_REJECT" { + weight = 15; + } +} \ No newline at end of file