From: Vsevolod Stakhov Date: Thu, 5 Nov 2015 13:55:22 +0000 (+0300) Subject: Fix variables names X-Git-Tag: 1.1.0~635 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8fc66640777ec304bd98fcce780d878216718ba5;p=thirdparty%2Frspamd.git Fix variables names --- diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 416053aba4..fba90dbeec 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -175,6 +175,7 @@ enum rspamd_log_format_type { RSPAMD_LOG_SCORES, RSPAMD_LOG_SYMBOLS, RSPAMD_LOG_IP, + RSPAMD_LOG_LEN, RSPAMD_LOG_DNS_REQ, RSPAMD_LOG_SMTP_FROM, RSPAMD_LOG_MIME_FROM, diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index ca9bfb3e7d..7d29bb161d 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -180,7 +180,7 @@ rspamd_config_defaults (struct rspamd_config *cfg) /* Default log line */ cfg->log_format_str = "id: <$mid>, $if_qid{qid: <$>,} $if_ip{ip: $,}" - "$if_ip{ip: $,} $if_from{from: <$>,} (default: $is_spam " + "$if_ip{ip: $,} $if_smtp_from{from: <$>,} (default: $is_spam " "($action): [$scores] [$symbols]), len: $len, time: $time_real real," " $time_virtual virtual, dns req: $dns_req"; } @@ -328,7 +328,7 @@ rspamd_config_process_var (struct rspamd_config *cfg, const rspamd_ftok_t *var, else if (rspamd_ftok_cstr_equal (&tok, "user", TRUE)) { type = RSPAMD_LOG_USER; } - else if (rspamd_ftok_cstr_equal (&tok, "isspam", TRUE)) { + else if (rspamd_ftok_cstr_equal (&tok, "is_spam", TRUE)) { type = RSPAMD_LOG_ISSPAM; } else if (rspamd_ftok_cstr_equal (&tok, "action", TRUE)) { @@ -343,6 +343,9 @@ rspamd_config_process_var (struct rspamd_config *cfg, const rspamd_ftok_t *var, else if (rspamd_ftok_cstr_equal (&tok, "ip", TRUE)) { type = RSPAMD_LOG_IP; } + else if (rspamd_ftok_cstr_equal (&tok, "len", TRUE)) { + type = RSPAMD_LOG_LEN; + } else if (rspamd_ftok_cstr_equal (&tok, "dns_req", TRUE)) { type = RSPAMD_LOG_DNS_REQ; }