aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-27 13:39:26 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-27 13:39:26 +0000
commit6176ad586b6c312b49d70c2917e38b1d851bda92 (patch)
tree3a4594057890d4ed2ab663ef73bb3d571c362df4 /src/libserver
parent2b9068e5f79b444977c007eff37c9749d1e3b3bb (diff)
downloadrspamd-6176ad586b6c312b49d70c2917e38b1d851bda92.tar.gz
rspamd-6176ad586b6c312b49d70c2917e38b1d851bda92.zip
[Feature] Add ignore_received option
In this mode rspamd ignores data from the first received (it might be produced by some third party and not our MTA)
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/cfg_file.h1
-rw-r--r--src/libserver/cfg_rcl.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index 17ca4f863..2ed82930b 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -246,6 +246,7 @@ struct rspamd_config {
gboolean allow_raw_input; /**< scan messages with invalid mime */
gboolean disable_hyperscan; /**< disable hyperscan usage */
gboolean enable_shutdown_workaround; /**< enable workaround for legacy SA clients (exim) */
+ gboolean ignore_received; /**< Ignore data from the first received header */
gsize max_diff; /**< maximum diff size for text parts */
gsize max_cores_size; /**< maximum size occupied by rspamd core files */
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index 83b3dcada..b5f5b0763 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -1675,6 +1675,12 @@ rspamd_rcl_config_init (struct rspamd_config *cfg)
G_STRUCT_OFFSET (struct rspamd_config, enable_shutdown_workaround),
0,
"Enable workaround for legacy clients");
+ rspamd_rcl_add_default_handler (sub,
+ "ignore_received",
+ rspamd_rcl_parse_struct_boolean,
+ G_STRUCT_OFFSET (struct rspamd_config, ignore_received),
+ 0,
+ "Ignore data from the first received header");
/* New DNS configuration */
ssub = rspamd_rcl_add_section_doc (&sub->subsections, "dns", NULL, NULL,
UCL_OBJECT, FALSE, TRUE,