summaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-01-02 21:48:13 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-01-02 21:48:13 +0000
commit955fb068cd72005c7277c5f0f3c2347144dbc6ea (patch)
tree7c94ffa3201fdb534227d16465a3eefafc8d91d6 /src/libserver
parent2270056a52964f3582f46e87c89b7564d26c833e (diff)
downloadrspamd-955fb068cd72005c7277c5f0f3c2347144dbc6ea.tar.gz
rspamd-955fb068cd72005c7277c5f0f3c2347144dbc6ea.zip
[Minor] Store module that has set the pre-result
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/protocol.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 9d83ae1db..380d80134 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -1211,14 +1211,20 @@ rspamd_scan_result_ucl (struct rspamd_task *task,
obj = top;
}
- if (pr && pr->message && !(pr->flags & RSPAMD_PASSTHROUGH_NO_SMTP_MESSAGE)) {
- /* Add smtp message if it does not exists: see #3269 for details */
- if (ucl_object_lookup (task->messages, "smtp_message") == NULL) {
- ucl_object_insert_key (task->messages,
- ucl_object_fromstring_common (pr->message, 0, UCL_STRING_RAW),
+ if (pr) {
+ if (pr->message && !(pr->flags & RSPAMD_PASSTHROUGH_NO_SMTP_MESSAGE)) {
+ /* Add smtp message if it does not exists: see #3269 for details */
+ if (ucl_object_lookup(task->messages, "smtp_message") == NULL) {
+ ucl_object_insert_key(task->messages,
+ ucl_object_fromstring_common(pr->message, 0, UCL_STRING_RAW),
"smtp_message", 0,
false);
+ }
}
+
+ ucl_object_insert_key (obj,
+ ucl_object_fromstring (pr->module),
+ "passthrough_module", 0, false);
}
ucl_object_insert_key (obj,