gboolean read_only;
gboolean skip_unknown;
gboolean no_share;
+ gboolean no_subject;
gint learn_condition_cb;
struct rspamd_hash_map_helper *skip_map;
struct fuzzy_ctx *ctx;
rule->no_share = ucl_obj_toboolean (value);
}
+ if ((value = ucl_object_lookup (obj, "no_subject")) != NULL) {
+ rule->no_subject = ucl_obj_toboolean (value);
+ }
+
if ((value = ucl_object_lookup (obj, "algorithm")) != NULL) {
rule->algorithm_str = ucl_object_tostring (value);
UCL_BOOLEAN,
NULL,
0,
- NULL,
+ "true",
0);
rspamd_rcl_add_doc_by_path (cfg,
"fuzzy_check.rule",
0,
NULL,
0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "fuzzy_check.rule",
+ "Do no use subject to distinguish short text hashes",
+ "no_subject",
+ UCL_BOOLEAN,
+ NULL,
+ 0,
+ "false",
+ 0);
+ rspamd_rcl_add_doc_by_path (cfg,
+ "fuzzy_check.rule",
+ "Disable sharing message stats with the fuzzy server",
+ "no_share",
+ UCL_BOOLEAN,
+ NULL,
+ 0,
+ "false",
+ 0);
return 0;
}
rspamd_cryptobox_hash_update (&st, part->utf_stripped_content->data,
part->utf_stripped_content->len);
- if (MESSAGE_FIELD (task, subject)) {
+ if (!rule->no_subject && (MESSAGE_FIELD (task, subject))) {
/* We also include subject */
rspamd_cryptobox_hash_update (&st, MESSAGE_FIELD (task, subject),
strlen (MESSAGE_FIELD (task, subject)));