Browse Source

Add 'allow_raw_input' option

tags/1.1.0
Vsevolod Stakhov 8 years ago
parent
commit
9accfd2573
4 changed files with 10 additions and 0 deletions
  1. 2
    0
      conf/options.inc
  2. 1
    0
      src/libserver/cfg_file.h
  3. 5
    0
      src/libserver/cfg_rcl.c
  4. 2
    0
      src/libserver/cfg_utils.c

+ 2
- 0
conf/options.inc View File

@@ -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;

+ 1
- 0
src/libserver/cfg_file.h View File

@@ -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 */


+ 5
- 0
src/libserver/cfg_rcl.c View File

@@ -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,

+ 2
- 0
src/libserver/cfg_utils.c View File

@@ -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

Loading…
Cancel
Save