From af918845b6a04565a60c7eb7058099575db2d281 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 1 Jan 2016 23:56:58 +0000 Subject: [PATCH] Add symbols_scores in log file --- src/libserver/cfg_file.h | 3 ++- src/libserver/cfg_utils.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 929f8a78d..96c4fb10b 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -198,7 +198,8 @@ enum rspamd_log_format_flags { RSPAMD_LOG_FLAG_DEFAULT = 0, RSPAMD_LOG_FLAG_OPTIONAL = (1 << 0), RSPAMD_LOG_FLAG_MIME_ALTERNATIVE = (1 << 1), - RSPAMD_LOG_FLAG_CONDITION = (1 << 2) + RSPAMD_LOG_FLAG_CONDITION = (1 << 2), + RSPAMD_LOG_FLAG_SYMBOLS_SCORES = (1 << 3) }; struct rspamd_log_format { diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index a3d801939..07d9ae44d 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -354,6 +354,10 @@ rspamd_config_process_var (struct rspamd_config *cfg, const rspamd_ftok_t *var, else if (rspamd_ftok_cstr_equal (&tok, "symbols", TRUE)) { type = RSPAMD_LOG_SYMBOLS; } + else if (rspamd_ftok_cstr_equal (&tok, "symbols_scores", TRUE)) { + type = RSPAMD_LOG_SYMBOLS; + flags |= RSPAMD_LOG_FLAG_SYMBOLS_SCORES; + } else if (rspamd_ftok_cstr_equal (&tok, "ip", TRUE)) { type = RSPAMD_LOG_IP; } -- 2.39.5