]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Replace builtin_suspicious TLDs with map-based configuration
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 28 Jan 2026 08:56:28 +0000 (08:56 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 28 Jan 2026 08:56:28 +0000 (08:56 +0000)
commit614e68c8b398ab7dd3e14dac0b8c73bfb0909abd
tree714fbbb240e29eb55998d3ee578bc59705a69760
parentcbcff0cc6ce7b4392fcf591167775f39108f5e77
[Feature] Replace builtin_suspicious TLDs with map-based configuration

Convert hardcoded suspicious TLDs list to a proper map file following
rspamd's standard map loading pattern with fallback support.

Changes:
- Add conf/maps.d/suspicious_tlds.inc with default TLDs (.tk, .ml, .ga, .cf, .gq)
- Update url_suspect.conf to use fallback+file:// pattern for user overrides
- Update url_suspect.lua to load TLDs via rspamd_map_add_from_ucl()

Users can now:
- Override entirely: create local.d/maps.d/suspicious_tlds.inc
- Extend defaults: create local.d/maps.d/suspicious_tlds.inc.local
- Disable: set suspicious_tlds_map = null in local.d/url_suspect.conf

Supersedes #5864 - the map-based approach inherently handles nil/missing
config gracefully, making the type check unnecessary.
conf/maps.d/suspicious_tlds.inc [new file with mode: 0644]
conf/modules.d/url_suspect.conf
src/plugins/lua/url_suspect.lua