aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-11-23 20:02:32 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-11-23 20:02:32 +0000
commit929a9746c963fba0b3c59f35a06f9100d0fac13a (patch)
tree4cf28274fd84578a8f3dda21972b289102990af5 /src/rspamd_proxy.c
parentfeb910e287c215d5a1b6a03856ad2a1cbd36a394 (diff)
downloadrspamd-929a9746c963fba0b3c59f35a06f9100d0fac13a.tar.gz
rspamd-929a9746c963fba0b3c59f35a06f9100d0fac13a.zip
[Feature] Allow to quarantine rejected messages using milter interface
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index 6223d32ef..5b2206be4 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -138,6 +138,8 @@ struct rspamd_proxy_ctx {
gboolean milter;
/* Discard messages instead of rejecting them */
gboolean discard_on_reject;
+ /* Quarantine messages instead of rejecting them */
+ gboolean quarantine_on_reject;
/* Milter spam header */
gchar *spam_header;
/* Sessions cache */
@@ -812,6 +814,14 @@ init_rspamd_proxy (struct rspamd_config *cfg)
"Tell MTA to discard rejected messages silently");
rspamd_rcl_register_worker_option (cfg,
type,
+ "quarantine_on_reject",
+ rspamd_rcl_parse_struct_boolean,
+ ctx,
+ G_STRUCT_OFFSET (struct rspamd_proxy_ctx, quarantine_on_reject),
+ 0,
+ "Tell MTA to quarantine rejected messages");
+ rspamd_rcl_register_worker_option (cfg,
+ type,
"spam_header",
rspamd_rcl_parse_struct_string,
ctx,
@@ -2115,7 +2125,7 @@ start_rspamd_proxy (struct rspamd_worker *worker) {
}
rspamd_milter_init_library (ctx->spam_header, ctx->sessions_cache,
- ctx->discard_on_reject);
+ ctx->discard_on_reject, ctx->quarantine_on_reject);
rspamd_lua_run_postloads (ctx->cfg->lua_state, ctx->cfg, ctx->ev_base,
worker);