gboolean disable_pcre_jit; /**< Disable pcre JIT */
gboolean own_lua_state; /**< True if we have created lua_state internally */
gboolean soft_reject_on_timeout; /**< If true emit soft reject on task timeout (if not reject) */
+ gboolean public_groups_only; /**< Output merely public groups everywhere */
gsize max_cores_size; /**< maximum size occupied by rspamd core files */
gsize max_cores_count; /**< maximum number of core files */
G_STRUCT_OFFSET (struct rspamd_config, check_all_filters),
0,
"Always check all filters");
+ rspamd_rcl_add_default_handler (sub,
+ "public_groups_only",
+ rspamd_rcl_parse_struct_boolean,
+ G_STRUCT_OFFSET (struct rspamd_config, public_groups_only),
+ 0,
+ "Output merely public groups everywhere");
rspamd_rcl_add_default_handler (sub,
"enable_experimental",
rspamd_rcl_parse_struct_boolean,
gdouble gr_score;
obj = ucl_object_typed_new (UCL_OBJECT);
+ ucl_object_reserve (obj, kh_size (mres->sym_groups));
kh_foreach (mres->sym_groups, gr, gr_score,{
+ if (task->cfg->public_groups_only &&
+ !(gr->flags & RSPAMD_SYMBOL_GROUP_PUBLIC)) {
+ continue;
+ }
sobj = rspamd_metric_group_ucl (task, gr, gr_score);
ucl_object_insert_key (obj, sobj, gr->name, 0, false);
});