]> source.dussan.org Git - rspamd.git/commitdiff
Add symbols_scores in log file
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 1 Jan 2016 23:56:58 +0000 (23:56 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 1 Jan 2016 23:56:58 +0000 (23:56 +0000)
src/libserver/cfg_file.h
src/libserver/cfg_utils.c

index 929f8a78db6afd8371446d76f6ec5a4b7aac1922..96c4fb10b8e77467236a1b34015edd9cf01e31be 100644 (file)
@@ -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 {
index a3d80193900a72f3342a9621f25b4b958afefaa3..07d9ae44dde721277f5d3ce3dd939d84c9dfc242 100644 (file)
@@ -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;
        }