summaryrefslogtreecommitdiffstats
path: root/src/libmime/message.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-02 13:38:57 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-02 13:38:57 +0000
commita1bdb1f4f56ea6b3877e9c9d030d085728f0d566 (patch)
tree58ad60e9c78d8dfbcd06f5d314a5c21465f8f1e2 /src/libmime/message.c
parent99488d5a2a601f4a4ae30036b07189ff9c17ed3c (diff)
downloadrspamd-a1bdb1f4f56ea6b3877e9c9d030d085728f0d566.tar.gz
rspamd-a1bdb1f4f56ea6b3877e9c9d030d085728f0d566.zip
[Rework] Make rspamd protocol messages useful
Each message is now represented by a string and category, so messages in metric is an UCL object of the following format: { "category": "string" } The significant category is `smtp_message` which should be used by rmilter to send a custom SMTP reply to a client.
Diffstat (limited to 'src/libmime/message.c')
-rw-r--r--src/libmime/message.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 7fc22d1ef..d9296964b 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1052,6 +1052,9 @@ process_text_part (struct rspamd_task *task,
task->pre_result.action = METRIC_ACTION_REJECT;
task->pre_result.str = "Gtube pattern";
+ ucl_object_insert_key (task->messages,
+ ucl_object_fromstring ("Gtube pattern"), "smtp_message", 0,
+ false);
rspamd_task_insert_result (task, GTUBE_SYMBOL, 0, NULL);
return;