aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-26 14:22:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-26 14:22:37 +0000
commitf7200dd41947e09e42d6528b16b659532c3c7b5a (patch)
tree3e4ddb152914b29c0129264fda03c5c7aaef85b7 /src/libserver/protocol.c
parent2ac0fbea2763ff9913c7924495c39869ddad924b (diff)
downloadrspamd-f7200dd41947e09e42d6528b16b659532c3c7b5a.tar.gz
rspamd-f7200dd41947e09e42d6528b16b659532c3c7b5a.zip
[Minor] Milter: Add support of quarantine and discard actions
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 713c54499..d8c790e8f 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -968,6 +968,17 @@ rspamd_metric_result_ucl (struct rspamd_task *task,
"subject", 0, false);
}
}
+ if (action->flags & RSPAMD_ACTION_MILTER) {
+ /* Treat milter action specially */
+ if (action->action_type == METRIC_ACTION_MILTER_DISCARD) {
+ ucl_object_insert_key (obj, ucl_object_fromstring ("discard"),
+ "reject", 0, false);
+ }
+ else if (action->action_type == METRIC_ACTION_MILTER_QUARANTINE) {
+ ucl_object_insert_key (obj, ucl_object_fromstring ("quarantine"),
+ "reject", 0, false);
+ }
+ }
/* Now handle symbols */
if (task->cmd == CMD_CHECK_V2) {