Skip to content

Commit 6c552e0

Browse files
committed
rspamd: force DMARC enforcement for certain domains
This replaces our previous approach of overriding the policies for these domains via static records in Unbound.
1 parent 396777f commit 6c552e0

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/rspamd/local.d/maps.d/blocklist_esld.map
1717
/rspamd/local.d/maps.d/blocklist_ip.map
1818
/rspamd/local.d/maps.d/blocklist_text.map
19+
/rspamd/local.d/maps.d/force_dmarc.map
1920
/rspamd/local.d/maps.d/spam_text.map
2021
/rspamd/local.d/maps.d/tor_exit.map
2122
/venv/

deploy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gixy nginx/nginx.conf
1919

2020
remote=root@mail.grapheneos.org
2121

22-
cp blocklist/{{blocklist_{addr,esld,ip,text},tor_exit},spam_text}.map rspamd/local.d/maps.d/
22+
cp blocklist/{{blocklist_{addr,esld,ip,text},tor_exit},dmarc_upgrade,spam_text}.map rspamd/local.d/maps.d/
2323

2424
rsync dovecot/{dovecot.conf,passwd} $remote:/etc/dovecot/
2525
rsync -r --delete dovecot/sieve/ $remote:/etc/dovecot/sieve/

rspamd/local.d/force_actions.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ rules {
2828
expression = "R_SPF_PERMFAIL & !DMARC_POLICY_ALLOW";
2929
message = "SPF permerror";
3030
}
31+
32+
DMARC_UPGRADE {
33+
action = "quarantine";
34+
expression = "DMARC_UPGRADE & !DMARC_POLICY_ALLOW";
35+
honor_action = ["reject", "soft reject"];
36+
}
3137
}

rspamd/local.d/multimap.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,10 @@ TOR_EXIT {
149149
map = "$LOCAL_CONFDIR/local.d/maps.d/tor_exit.map";
150150
action = "reject";
151151
}
152+
153+
DMARC_UPGRADE {
154+
type = "header";
155+
header = "From";
156+
filter = "email:domain:tld";
157+
map = "$LOCAL_CONFDIR/local.d/maps.d/dmarc_upgrade.map";
158+
}

0 commit comments

Comments
 (0)