[Rspamd-Users] Rspamd configtest reports “cannot add rule” – Help with multimap conflict wanted
Andreas
rspamd at linuxmaker.com
Wed Jul 30 06:56:17 UTC 2025
Hello everyone,
I'm currently encountering a problem with my Rspamd configuration on Debian
Bookworm.
When testing my settings with
rspamadm configtest
I receive the following messages:
cannot add rule: "BLACKLISTED_SENDER_DOMAINS"
redefining fallback backend from /etc/rspamd/maps.d/surbl-whitelist.inc to /
etc/rspamd/maps.d/surbl-whitelist.inc
syntax OK
The part of my multimap.conf:
BLACKLISTED_SENDER_DOMAINS {
type = "smtp_from";
filter = "email:domain";
map = "${LOCAL_CONFDIR}/local.d/maps.d/banned_sender_domain.map";
action = "reject";
prefilter = true;
priority = 100;
messages = "This blacklisted sender domain is blocked!";
symbol = "BLACKLISTED_DOMAINS";
}
BANNED_EXTENSIONS {
type = "filename";
filter = "extension";
map = "${LOCAL_CONFDIR}/local.d/maps.d/banned_extensions.map";
symbol = "BANNED_EXTENSIONS";
action = "reject";
prefilter = true;
messages = "A restricted file type was found";
}
That means the syntax is basically correct, but Rspamd refuses to add the
"BLACKLISTED_SENDER_DOMAINS" rule because it apparently already exists or is
defined twice. Furthermore, the surbl-whitelist.inc map is defined twice as a
"fallback backend" – a kind of redefinition, which indicates a conflict.
I took the following steps to find the problem:
The file /etc/rspamd/local.d/multimap.conf contains the definitions for my
multimap rules, such as BANNED_DOMAINS.
I searched for additional definitions using grep -r BANNED_DOMAINS /etc/
rspamd/, as well as for surbl-whitelist.inc with
grep -r surbl-whitelist.inc /etc/rspamd/
This found entries in /etc/rspamd/modules.d/rbl.conf and /etc/rspamd/local.d/
rbl.conf that reference surbl-whitelist.inc multiple times.
I restarted Rspamd several times and monitored the logs, but found no evidence
of duplicate multimap rules or other obvious conflicts.
The directory /var/lib/rspamd/dynamic doesn't exist, so dynamic configuration
files there can't be the cause.
I suspect that Rspamd isn't accepting the multimap rule due to a duplicate
definition or a conflicting configuration in one of the includes, but I can't find
the exact location.
Does anyone have any ideas how I can avoid the duplicate map definition or how
I can resolve the "cannot add rule" error?
Best regards
Andreas
More information about the Users
mailing list