aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/surbl.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-17 18:10:23 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-17 18:10:23 +0000
commit9b57850ce5b78737273e7c202e8eb1ecb26e9f3a (patch)
treed17240f7c30bdce95c10f49021a417be0e613dac /src/plugins/surbl.c
parent33eb7e3b2a6b43ec0ddf30ffcde2f613be79f375 (diff)
downloadrspamd-9b57850ce5b78737273e7c202e8eb1ecb26e9f3a.tar.gz
rspamd-9b57850ce5b78737273e7c202e8eb1ecb26e9f3a.zip
[Minor] Allow `rules` alias for consistency in SURBL
Diffstat (limited to 'src/plugins/surbl.c')
-rw-r--r--src/plugins/surbl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 1ad09e649..f364ce64d 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -775,6 +775,18 @@ surbl_module_config (struct rspamd_config *cfg)
}
}
}
+
+ value = rspamd_config_get_module_opt (cfg, "surbl", "rules");
+ if (value != NULL && value->type == UCL_OBJECT) {
+ ucl_object_iter_t it = NULL;
+ const ucl_object_t *cur_value;
+
+ /* New style only */
+ while ((cur_value = ucl_object_iterate (value, &it, true)) != NULL) {
+ nrules += surbl_module_parse_rule (cur_value, cfg, monitored_opts);
+ }
+ }
+
/* Add default suffix */
if (surbl_module_ctx->suffixes == NULL) {
msg_err_config ("surbl module loaded but no suffixes defined, skip "