summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-16 22:43:16 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-16 22:43:16 +0000
commit9f76a30c016b55103f443bc6858f6b557cc5eb36 (patch)
treeb68743784b02172fc79876bfc7c5c662ad425967 /src
parentdf91fb12eb5f37bfbc46c9ec5dca7310360d3a77 (diff)
downloadrspamd-9f76a30c016b55103f443bc6858f6b557cc5eb36.tar.gz
rspamd-9f76a30c016b55103f443bc6858f6b557cc5eb36.zip
Don't write URLs by default as it is too verbose
Diffstat (limited to 'src')
-rw-r--r--src/libserver/protocol.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 35a74208f..e3f39899c 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -977,13 +977,16 @@ rspamd_protocol_write_ucl (struct rspamd_task *task)
ucl_object_insert_key (top, rspamd_str_list_ucl (
task->messages), "messages", 0, false);
}
- if (g_hash_table_size (task->urls) > 0) {
- ucl_object_insert_key (top, rspamd_urls_tree_ucl (task->urls,
- task), "urls", 0, false);
- }
- if (g_hash_table_size (task->emails) > 0) {
- ucl_object_insert_key (top, rspamd_emails_tree_ucl (task->emails, task),
- "emails", 0, false);
+
+ if (task->cfg->log_urls || (task->flags & RSPAMD_TASK_FLAG_EXT_URLS)) {
+ if (g_hash_table_size (task->urls) > 0) {
+ ucl_object_insert_key (top, rspamd_urls_tree_ucl (task->urls,
+ task), "urls", 0, false);
+ }
+ if (g_hash_table_size (task->emails) > 0) {
+ ucl_object_insert_key (top, rspamd_emails_tree_ucl (task->emails, task),
+ "emails", 0, false);
+ }
}
ucl_object_insert_key (top, ucl_object_fromstring (task->message_id),