System-wide Rspamd blacklist/whitelist?

petersconsult

Verified User
Joined
Sep 10, 2021
Messages
96
Hello all,
Are there system-wide blacklist and whitelist for Rspamd?
i'd like to whitelist some domains in Rspamd without affecting Exim..

i found this online; has anyone tried this? would it work?

first, create the file /etc/rspamd/local.d/multimap.conf
Code:
WHITELIST_SENDER_DOMAIN {
        type = "from";
        filter = "email:domain";
        map = "/etc/rspamd/local.d/whitelist.sender.domain.map";
        symbol = "WHITELIST_SENDER_DOMAIN";
        score = -9.0;
}

then, in the file /etc/rspamd/local.d/whitelist.sender.domain.map
Code:
meinedomain.tld
anderedomain.tld

Thank You All!
 
Hello all,

For anyone who's interested in setting up a server-wide from email/domain whitelist, this is what i did, and it looks like it works!

first, i created the file /etc/rspamd/local.d/multimap.conf
Code:
# note that the name my_whitelist_sender_domain could be anything you like, as long as it's not taken
my_whitelist_sender_domain {
    type = "from";
    filter = 'regexp:/.*/';
    map = "/etc/rspamd/local.d/whitelist.sender.domain.simple.map";
    description = "my Global Whitelist -- simple";
    regexp = true;
    prefilter = true;
    action = "accept";
    }

then, i created the file /etc/rspamd/local.d/whitelist.sender.domain.simple.map (again this filename could be anything)
Code:
# list the emails/domains you want to whitelist
domain1.tld
domain2.tld
[email protected]
[email protected]

This filter is designed to be quite promiscuous: it'll match any FROM email address that ends with any of the items listed in the .map file..

So, for example, all of the following will get accepted, regardless of score:
[email protected]
[email protected]
[email protected]
[email protected]

but, these will go through the normal scoring system:
[email protected]
[email protected]

i really hope this helps!

PS: to create a blacklist, you just change action = "accept" to action = "reject"
 
Last edited:
Back
Top