gboolean ignore_received; /**< Ignore data from the first received header */
gboolean check_local; /** Don't disable any checks for local networks */
gboolean check_authed; /** Don't disable any checks for authenticated users */
+ gboolean enable_sessions_cache; /**< Enable session cache for debug */
gsize max_diff; /**< maximum diff size for text parts */
gsize max_cores_size; /**< maximum size occupied by rspamd core files */
guint max_word_len; /**< maximum length of the word to be considered */
guint words_decay; /**< limit for words for starting adaptive ignoring */
guint history_rows; /**< number of history rows stored */
+ guint max_session_cache; /**< maximum number of sessions cache elts */
GList *classify_headers; /**< list of headers using for statistics */
struct module_s **compiled_modules; /**< list of compiled C modules */
G_STRUCT_OFFSET (struct rspamd_config, default_max_shots),
0,
"Maximum number of hits per a single symbol (default: 100)");
+ rspamd_rcl_add_default_handler (sub,
+ "sessions_cache",
+ rspamd_rcl_parse_struct_boolean,
+ G_STRUCT_OFFSET (struct rspamd_config, enable_sessions_cache),
+ 0,
+ "Enable sessions cache to debug dangling sessions");
+ rspamd_rcl_add_default_handler (sub,
+ "max_session_cache",
+ rspamd_rcl_parse_struct_integer,
+ G_STRUCT_OFFSET (struct rspamd_config, max_session_cache),
+ 0,
+ "Maximum number of sessions in cache before warning (default: 100)");
/* Neighbours configuration */
rspamd_rcl_add_section_doc (&sub->subsections, "neighbours", "name",
#define DEFAULT_MAX_MESSAGE (50 * 1024 * 1024)
#define DEFAULT_MAX_PIC (1 * 1024 * 1024)
#define DEFAULT_MAX_SHOTS 100
+#define DEFAULT_MAX_SESSIONS 100
struct rspamd_ucl_map_cbdata {
struct rspamd_config *cfg;
cfg->redis_pool = rspamd_redis_pool_init ();
#endif
cfg->default_max_shots = DEFAULT_MAX_SHOTS;
+ cfg->max_session_cache = DEFAULT_MAX_SESSIONS;
REF_INIT_RETAIN (cfg, rspamd_config_free);