diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-12 14:24:51 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-12 14:24:51 +0000 |
commit | 9accfd257320343df82d15a4ece578d71ec9a89f (patch) | |
tree | ff3efb21a25737f651e755422cee9334fec7a260 /src | |
parent | f3585bb8b0ecc2dc710c9958484748afad38fec6 (diff) | |
download | rspamd-9accfd257320343df82d15a4ece578d71ec9a89f.tar.gz rspamd-9accfd257320343df82d15a4ece578d71ec9a89f.zip |
Add 'allow_raw_input' option
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/cfg_file.h | 1 | ||||
-rw-r--r-- | src/libserver/cfg_rcl.c | 5 | ||||
-rw-r--r-- | src/libserver/cfg_utils.c | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 9e1164175..7036fd552 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -222,6 +222,7 @@ struct rspamd_config { gboolean convert_config; /**< convert config to XML format */ gboolean strict_protocol_headers; /**< strictly check protocol headers */ gboolean check_all_filters; /**< check all filters */ + gboolean allow_raw_input; /**< scan messages with invalid mime */ gsize max_diff; /**< maximum diff size for text parts */ diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index 42830d700..eec9c0fc6 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -1314,6 +1314,11 @@ rspamd_rcl_config_init (void) rspamd_rcl_parse_struct_string_list, G_STRUCT_OFFSET (struct rspamd_config, explicit_modules), RSPAMD_CL_FLAG_STRING_LIST_HASH); + rspamd_rcl_add_default_handler (sub, + "allow_raw_input", + rspamd_rcl_parse_struct_boolean, + G_STRUCT_OFFSET (struct rspamd_config, allow_raw_input), + 0); /* New DNS configuration */ ssub = rspamd_rcl_add_section (&sub->subsections, "dns", NULL, NULL, diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 65317b9cd..568efe934 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -183,6 +183,8 @@ rspamd_config_defaults (struct rspamd_config *cfg) "$if_user{ user: $,}$if_smtp_from{ from: <$>,} (default: $is_spam " "($action): [$scores] [$symbols]), len: $len, time: $time_real real," " $time_virtual virtual, dns req: $dns_req"; + /* Allow non-mime input by default */ + cfg->allow_raw_input = TRUE; } void |