Skip to content

Instantly share code, notes, and snippets.

@stephdl
Created November 26, 2019 17:35
Show Gist options
  • Save stephdl/ea89a9f5b0ee9b4044ccf1b1ae5c5bbf to your computer and use it in GitHub Desktop.
Save stephdl/ea89a9f5b0ee9b4044ccf1b1ae5c5bbf to your computer and use it in GitHub Desktop.
MULTIMAP_CONFIGURATION
[root@ns7loc14 ~]# cat /etc/rspamd/local.d/multimap.conf
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
# local.d/multimap.conf
# whitelist the IP
IP_WHITELIST {
type = "ip";
prefilter = true;
map = "${CONFDIR}/whitelist_ip.map";
action = "accept";
symbol = "IP_WHITELIST";
description = "Accept SMTP sender by exact IP address";
}
# whitelist the senders
FROM_WHITELIST {
type = "from";
map = [
"${CONFDIR}/whitelist_from.map",
];
prefilter = true;
filter = "email:addr";
action = "accept";
description = "Accept SMTP sender by exact email address";
symbol = "FROM_WHITELIST";
}
#whitelist the sub.domains of senders
FROM_SUBDOMAINS_WHITELIST {
map = [
"${CONFDIR}/whitelist_from_subdomains.map",
];
type = "from";
prefilter = true;
action = "accept";
filter = "email:domain";
description = "Accept SMTP sender by exact domain name";
symbol = "FROM_SUBDOMAINS_WHITELIST";
}
#whitelist the domains of senders
FROM_DOMAINS_WHITELIST {
map = [
"${CONFDIR}/whitelist_from_domains.map",
];
type = "from";
require_symbols = "!FROM_SUBDOMAINS_WHITELIST";
prefilter = true;
action = "accept";
filter = "email:domain:tld";
description = "Accepted SMTP sender by top level domain name suffix";
symbol = "FROM_DOMAINS_WHITELIST";
}
#blacklist the senders
FROM_BLACKLIST {
type = "from";
map = [
"${CONFDIR}/blacklist_from.map",
];
action = "reject";
prefilter = true;
filter = "email:addr";
require_symbols = "!IP_WHITELIST";
symbol = "FROM_BLACKLIST";
description = "Reject SMTP sender by exact email address";
message = "Sender address rejected";
}
#blacklist the subdomains of senders
FROM_SUBDOMAINS_BLACKLIST {
map = [
"${CONFDIR}/blacklist_from_subdomains.map",
];
type = "from";
filter = "email:domain";
description = "Reject SMTP sender by exact domain name";
symbol = "FROM_SUBDOMAINS_BLACKLIST";
action = "reject";
prefilter = true;
message = "Sender subdomain address rejected";
}
#blacklist the domains of senders
FROM_DOMAINS_BLACKLIST {
map = [
"${CONFDIR}/blacklist_from_domains.map",
];
type = "from";
require_symbols = "!FROM_SUBDOMAINS_BLACKLIST";
filter = "email:domain:tld";
description = "Reject SMTP sender by top level domain name suffix";
symbol = "FROM_DOMAINS_BLACKLIST";
action = "reject";
prefilter = true;
message = "Sender domain address rejected";
}
#whitelist the subdomain of recipients
TO_SUBDOMAINS_WHITELIST {
map = [
"${CONFDIR}/whitelist_to_subdomains.map",
];
type = "rcpt";
prefilter = true;
action = "accept";
filter = "email:domain";
description = "Accept SMTP recipient by exact domain name";
symbol = "TO_SUBDOMAINS_WHITELIST";
}
#whitelist the domain of recipients
TO_DOMAINS_WHITELIST {
map = [
"${CONFDIR}/whitelist_to_domains.map",
];
type = "rcpt";
require_symbols = "!TO_SUBDOMAINS_WHITELIST";
prefilter = true;
action = "accept";
filter = "email:domain:tld";
description = "Accept SMTP recipient by top level domain name suffix";
symbol = "TO_DOMAINS_WHITELIST";
}
#whitelist the email address of recipients
TO_WHITELIST {
type = "rcpt";
map = [
"${CONFDIR}/whitelist_to.map",
];
prefilter = true;
filter = "email:addr";
action = "accept";
description = "Accept SMTP recipient by exact email address";
symbol = "TO_WHITELIST";
}
#reject email when the file extension is found
FORBIDDEN_FILE_EXTENSION {
type = "filename";
filter = "extension";
map = [
"${CONFDIR}/forbidden_file_extension.map",
];
action = "reject";
symbol = "FORBIDDEN_FILE_EXTENSION";
description = "List of forbidden file extensions";
message = "Forbidden attachment name extension";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment