From 12e4ec8a6ef2f17f0de4bd1ccb5905634e0fd824 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 27 Nov 2015 16:47:05 +0000 Subject: Add alias for 'options = noip' as 'no_ip = true' --- src/plugins/surbl.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index d0424238d..361a3780c 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -480,12 +480,20 @@ surbl_module_config (struct rspamd_config *cfg) surbl_module_ctx->surbl_pool, ucl_obj_tostring (cur)); } + cur = ucl_obj_get_key (cur_rule, "options"); if (cur != NULL && cur->type == UCL_STRING) { if (strstr (ucl_obj_tostring (cur), "noip") != NULL) { new_suffix->options |= SURBL_OPTION_NOIP; } } + + cur = ucl_obj_get_key (cur_rule, "no_ip"); + if (cur != NULL && cur->type == UCL_STRING) { + if (ucl_object_toboolean (cur)) { + new_suffix->options |= SURBL_OPTION_NOIP; + } + } cur = ucl_obj_get_key (cur_rule, "resolve_ip"); if (cur != NULL && cur->type == UCL_BOOLEAN) { if (ucl_object_toboolean (cur)) { -- cgit v1.2.3