From: Vsevolod Stakhov Date: Fri, 27 Nov 2015 16:47:05 +0000 (+0000) Subject: Add alias for 'options = noip' as 'no_ip = true' X-Git-Tag: 1.1.0~456 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=12e4ec8a6ef2f17f0de4bd1ccb5905634e0fd824;p=rspamd.git Add alias for 'options = noip' as 'no_ip = true' --- 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)) {