/* Post process part */
detect_text_language (text_part);
text_part->words = rspamd_tokenize_text (text_part->content->data,
- text_part->content->len, text_part->is_utf, 4,
+ text_part->content->len, text_part->is_utf, task->cfg->min_word_len,
&text_part->urls_offset);
}
guint upstream_max_errors; /**< upstream max errors before shutting off */
gdouble upstream_error_time; /**< rate of upstream errors */
gdouble upstream_revive_time; /**< revive timeout for upstreams */
+
+ guint32 min_word_len; /**< minimum length of the word to be considered */
};
rspamd_rcl_parse_struct_boolean,
G_STRUCT_OFFSET (struct rspamd_config, check_all_filters),
0);
+ rspamd_rcl_add_default_handler (sub,
+ "min_word_len",
+ rspamd_rcl_parse_struct_integer,
+ G_STRUCT_OFFSET (struct rspamd_config, min_word_len),
+ RSPAMD_CL_FLAG_INT_32);
/**
* Metric section
#define DEFAULT_RLIMIT_NOFILE 2048
#define DEFAULT_RLIMIT_MAXCORE 0
#define DEFAULT_MAP_TIMEOUT 10
+#define DEFAULT_MIN_WORD 4
struct rspamd_ucl_map_cbdata {
struct rspamd_config *cfg;
cfg->log_level = G_LOG_LEVEL_WARNING;
cfg->log_extended = TRUE;
+
+ cfg->min_word_len = DEFAULT_MIN_WORD;
}
void