@@ -25,3 +25,5 @@ classify_headers = [ | |||
control_socket = "$DBDIR/rspamd.sock mode=0600"; | |||
history_rows = 200; | |||
explicit_modules = ["settings"]; | |||
# Scan messages even if they are not MIME | |||
allow_raw_input = true; |
@@ -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 */ | |||
@@ -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, |
@@ -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 |