diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-02 12:55:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-02 12:55:55 +0100 |
commit | 4c9f6b21186be5c87785d5f6c91fb26cb8300b5b (patch) | |
tree | 74802fea670606876175e8bccef2d41a4986bc65 /src/plugins/spf.c | |
parent | 0b7bbd9a1df25d3cf93173dc0f853d1863930ae8 (diff) | |
download | rspamd-4c9f6b21186be5c87785d5f6c91fb26cb8300b5b.tar.gz rspamd-4c9f6b21186be5c87785d5f6c91fb26cb8300b5b.zip |
[Minor] Unify check_auth/check_local options
Diffstat (limited to 'src/plugins/spf.c')
-rw-r--r-- | src/plugins/spf.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c index 5ec5bfcfc..46160878f 100644 --- a/src/plugins/spf.c +++ b/src/plugins/spf.c @@ -206,15 +206,26 @@ spf_module_config (struct rspamd_config *cfg) spf_module_ctx->whitelist_ip = NULL; - if ((value = - rspamd_config_get_module_opt (cfg, "options", "check_local")) != NULL) { + value = rspamd_config_get_module_opt (cfg, "spf", "check_local"); + + if (value == NULL) { + rspamd_config_get_module_opt (cfg, "options", "check_local"); + } + + if (value != NULL) { spf_module_ctx->check_local = ucl_obj_toboolean (value); } else { spf_module_ctx->check_local = FALSE; } - if ((value = - rspamd_config_get_module_opt (cfg, "options", "check_authed")) != NULL) { + + value = rspamd_config_get_module_opt (cfg, "spf", "check_authed"); + + if (value == NULL) { + rspamd_config_get_module_opt (cfg, "options", "check_authed"); + } + + if (value != NULL) { spf_module_ctx->check_authed = ucl_obj_toboolean (value); } else { |