rspamd: reject emails with invalid SPF, DKIM, DMARC

This commit is contained in:
missytake
2023-12-27 11:17:24 +01:00
parent 5ef2100765
commit 101c3a6b47
2 changed files with 26 additions and 0 deletions

View File

@@ -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"),

View File

@@ -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;
}
}