From: Vsevolod Stakhov Date: Sat, 16 Jan 2016 22:43:16 +0000 (+0000) Subject: Don't write URLs by default as it is too verbose X-Git-Tag: 1.1.0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f76a30c016b55103f443bc6858f6b557cc5eb36;p=thirdparty%2Frspamd.git Don't write URLs by default as it is too verbose --- diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 35a74208f9..e3f39899c2 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),