Skip to content

Instantly share code, notes, and snippets.

@jeffrysleddens
Last active October 22, 2020 11:04
Show Gist options
  • Save jeffrysleddens/236fec1d3c9e64f6cc1663dde2974e97 to your computer and use it in GitHub Desktop.
Save jeffrysleddens/236fec1d3c9e64f6cc1663dde2974e97 to your computer and use it in GitHub Desktop.
rspamd rules for Invaluement.com Service Provider DNSBL
These rules catch Sendgrid senders that are listed on Invaluement.com's Service Provider DNSBLs
https://www.invaluement.com/serviceproviderdnsbl/
Both files need to be placed in the /etc/rspamd/local.d directory.
# /etc/rspamd/local.d/multimap.conf
SENDGRID_INVALUEMENT_ID_BL {
require_symbols = "HAS_SG_EID";
type = "selector";
map = "https://www.invaluement.com/spdata/sendgrid-id-dnsbl.txt";
selector = 'from("smtp","orig").regexp("/^<?bounces\+(\d+)\-[^@]+@/i").last';
score = 8;
description = "Abusive Sendgrid IDs"
}
SENDGRID_INVALUEMENT_ENVFROM_BL {
require_symbols = "HAS_SG_EID";
type = "from";
filter = "email:domain:tld";
map = "https://www.invaluement.com/spdata/sendgrid-envelopefromdomain-dnsbl.txt";
score = 2;
description = "Abusive Sendgrid Envelope From Domains"
}
# /etc/rspamd/local.d/regexp.conf
HAS_SG_EID {
re = "header_exists('X-SG-EID')";
description = "Has X-SG-EID header";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment