aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-09-27 16:53:57 +0600
committerGitHub <noreply@github.com>2024-09-27 16:53:57 +0600
commit705f647b879a8c29219faa549862864fee8375c6 (patch)
tree4221c6d163d6bce5bc9066667c50fcfe9a88b363 /src/libserver
parent0b397e439ffdaa58ca709db91ac51d30c80cbd50 (diff)
parentf8700e56ec5659f331f0aca0b28eec43a4e7cb33 (diff)
downloadrspamd-705f647b879a8c29219faa549862864fee8375c6.tar.gz
rspamd-705f647b879a8c29219faa549862864fee8375c6.zip
Merge pull request #5056 from rspamd/vstakhov-utf8-mime
[Feature] MIME UTF8 support
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/cfg_file.h1
-rw-r--r--src/libserver/cfg_rcl.cxx8
-rw-r--r--src/libserver/cfg_utils.cxx1
3 files changed, 9 insertions, 1 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index fa784f2a2..f59c6ff89 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -367,6 +367,7 @@ struct rspamd_config {
gboolean public_groups_only; /**< Output merely public groups everywhere */
enum rspamd_gtube_patterns_policy gtube_patterns_policy; /**< Enable test patterns */
gboolean enable_css_parser; /**< Enable css parsing in HTML */
+ gboolean enable_mime_utf; /**< Enable utf8 mime parsing */
gsize max_cores_size; /**< maximum size occupied by rspamd core files */
gsize max_cores_count; /**< maximum number of core files */
diff --git a/src/libserver/cfg_rcl.cxx b/src/libserver/cfg_rcl.cxx
index 270678491..79509e12e 100644
--- a/src/libserver/cfg_rcl.cxx
+++ b/src/libserver/cfg_rcl.cxx
@@ -1929,7 +1929,13 @@ rspamd_rcl_config_init(struct rspamd_config *cfg, GHashTable *skip_sections)
rspamd_rcl_parse_struct_boolean,
G_STRUCT_OFFSET(struct rspamd_config, enable_css_parser),
0,
- "Enable CSS parser (experimental)");
+ "Enable CSS parser");
+ rspamd_rcl_add_default_handler(sub,
+ "enable_mime_utf",
+ rspamd_rcl_parse_struct_boolean,
+ G_STRUCT_OFFSET(struct rspamd_config, enable_mime_utf),
+ 0,
+ "Enable UTF8 mode for mime");
rspamd_rcl_add_default_handler(sub,
"enable_experimental",
rspamd_rcl_parse_struct_boolean,
diff --git a/src/libserver/cfg_utils.cxx b/src/libserver/cfg_utils.cxx
index d8696e72d..38adf8390 100644
--- a/src/libserver/cfg_utils.cxx
+++ b/src/libserver/cfg_utils.cxx
@@ -341,6 +341,7 @@ rspamd_config_new(enum rspamd_config_init_flags flags)
cfg->heartbeat_interval = 10.0;
cfg->enable_css_parser = true;
+ cfg->enable_mime_utf = false;
cfg->script_modules = g_ptr_array_new();
REF_INIT_RETAIN(cfg, rspamd_config_free);